on 04-14-2009 10:30 AM
Hi WD4Jers,
Is there a way to capture the exception arising out of the Meta data mismatch in RFC metadata and WebDynpro context meta data. It is a well known fact that the RFC meta cache needs to be cleared to ensure proper functioning of a WD4J application using RFC, if the RFC has undergone a change at the structural meta data level.
However, the question is, is there a elegant way to catch this exception and show a meaningful message on the WD4J screen / application, that the cache needs to be cleared instead of showing up the error stacktrace, as this results in loss of the form fields data ?
Any pointers will be appreciated.
BR,
Bala
Hi
In catch block of code put the if conditions. First you identify the for that exception what expection Message you will get by using e.getMessage
Observe the below code
catch(Exception e){
IWDMessageManager message = wdThis.wdGetAPI().getMessageManager();
message.reportException(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("RFC_ERROR"),true);
if(null!=e){
if("USER_NOT_FOUND".equalsIgnoreCase(e.getMessage()))
{
message.reportException(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("NOT_MAINTAINED_PERN") + usrid,true);
}
Regards
_SS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
At any point of time it will goes to catch block at Rumtime.
If you want cross verify put the Print messages in all the catch blocks of your code.
It's completely depends upon the developer , how u catch Runtime errors.
Before catch you have to know all the possible Runtime errors.
Hope you understood.
At Runtime or Designment.
In the above mentioned example is Runtime exception of METADA only
Regards
-SS
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.