Skip to Content
0
Former Member
Apr 21, 2010 at 02:25 AM

How to catch JCO exception in web dynpro java

32 Views

Hello,

I have a scenarion where the JCO connection Exeption has to be trapped and dispaly the user defined error message...

How to trap it..

I used the following the code, but it doesn't work.

catch (JCO.AbapException ex) {

if (ex.getKey().equalsIgnoreCase("NOT_FOUND")) {

messageMgr.reportException("Dictionary structure/table not found.",false);

System.exit(1);

}else {

messageMgr.reportException(ex.getMessage(),false);

System.exit(1);

}

}catch (JCO.Exception ex) {

ex.printStackTrace();

System.exit(1);

}