[jboss-user] [EJB3] - Re: Unable to catch RuntimeException in client EJB
Jan Martiska
do-not-reply at jboss.com
Thu Dec 13 07:32:42 EST 2012
Jan Martiska [https://community.jboss.org/people/jmartisk] created the discussion
"Re: Unable to catch RuntimeException in client EJB"
To view the discussion, visit: https://community.jboss.org/message/783263#783263
--------------------------------------------------------------
I guess you cannot work around the fact that the exception will be wrapped. But you still can try to catch the wrapper exception and inspect it to see if the exception inside is your SecurityBreakException, can't you?
catch (EJBTransactionRolledbackException e) {
if(e.getCause() instanceof SecurityBreakException) {
SecurityBreakException ex = (SecurityBreakException)e.getCause();
// parse the exception and show a meaningful message to user
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783263#783263]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121213/f59b6992/attachment-0001.html
More information about the jboss-user
mailing list