cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding exception handling in webdynpro

Former Member
0 Kudos

Dear frds..

I am using webservice for webdynpro application.,,,

when i call a particular method of webservice in webdynpro i get o/ps but when i give wrong outputs the webservice exception is shown in webdynpro at the bottom

I dont wanna to display the exception mesage doen the bottom,

Instead of dispalying the exception message, i want to dispaly some other things like confirmation box or dialog box..

How to catch exceptions in webdynpro?

if use try catch finally block in webdynpro,

and in catch block i kept messaeg of popup confiramtion box, it is not been displayed....

Thanks in advance

Shravan

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

For displaying error in confirmation box, try following code:

Create a eventhandler named as "Exception"

try

{

//Some statements

}

catch(Exception e)

{

IWDControllerInfo controllerInfo =wdControllerAPI.getViewInfo().getViewController();

String dialogText = "TYPE UR ERROR MESSAGE";

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,

controllerInfo.findInEventHandlers("Exception"),"OK");

dialog.open();

}

OR

To display error message at some place other than bottom( which is default), add a UI element named as MessageArea and placed it at the required location in View and trying executing the application.

Former Member
0 Kudos

hi,

for exception handling u can use this

try

{

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("Exception is "+e.getMessage(),false);

}

Regards

Trilochan

former_member214651
Active Contributor
0 Kudos

Hi Shravan,

write the code for the window and call the method in the catch method. this might work for u

Regards,

Poojith MV

Former Member
0 Kudos

Hi,


try
    {
//Code
    }catch( Exception e)
    {
    	String s = e.getLocalizedMessage();
    }

You may make use of this string to assign to value node and bind it to any UI element to display.

Regards

Vinod V