Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2012-10-07T07:15:47Z by mmalc
rmillav
rmillav
4 Posts
ACCEPTED ANSWER

Pinned topic Exception information in Snippet

‏2012-08-20T14:24:05Z |
Hi,

I am working on handling exceptions for business processes and I need to get as much information as posible.

So ... When an exception occurs in a snippet, in the console we can see the name of the snippet and the exception. But also we see the line number and the code that generated than exception.

I need to know where can I get that specific information.

Thanks
Updated on 2012-10-07T07:15:47Z at 2012-10-07T07:15:47Z by mmalc
  • SystemAdmin
    SystemAdmin
    3556 Posts
    ACCEPTED ANSWER

    Re: Exception information in Snippet

    ‏2012-08-24T08:57:00Z  in response to rmillav
    use getCurrentFaultAsException() method to get the current fault which is occurred. geter methods are available to dig in to the fault.
    • rmillav
      rmillav
      4 Posts
      ACCEPTED ANSWER

      Re: Exception information in Snippet

      ‏2012-08-27T18:41:59Z  in response to SystemAdmin
      I've used getCurrentFaultAsException() but i can not get that specific information of a snippet
  • SergeyUtkin
    SergeyUtkin
    14 Posts
    ACCEPTED ANSWER

    Re: Exception information in Snippet

    ‏2012-09-10T06:07:45Z  in response to rmillav
    If your code is well designed - you don't need line number. To get the code responsible for the exception in your console - you can use even log4j with some default console appender.
  • rmillav
    rmillav
    4 Posts
    ACCEPTED ANSWER

    Re: Exception information in Snippet

    ‏2012-09-12T22:47:25Z  in response to rmillav
    I'm not asking wheter the code is well designed or not i just want to know, where can I get that information?...
    • mmalc
      mmalc
      231 Posts
      ACCEPTED ANSWER

      Re: Exception information in Snippet

      ‏2012-10-07T07:15:47Z  in response to rmillav
      See what type of exception it is and then cast it to the apropriate class to see if you can pull out the stack trace.

      http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topic=%2Fcom.ibm.websphere.wbpmcore.javadoc.doc%2Fweb%2Fapidocs%2Fcom%2Fibm%2Fbpe%2Fapi%2FApplicationFaultException2.html