[jboss-jira] [JBoss JIRA] Created: (JBPM-826) Incorrect action exception handling

Pedro Silva (JIRA) jira-events at jboss.com
Mon Jan 22 09:47:53 EST 2007


Incorrect action exception handling
-----------------------------------

                 Key: JBPM-826
                 URL: http://jira.jboss.com/jira/browse/JBPM-826
             Project: JBoss jBPM
          Issue Type: Bug
          Components: Core Engine
    Affects Versions: jBPM 3.1.3
         Environment: Eclipse + Tomcat + JDK 6.0
            Reporter: Pedro Silva
         Assigned To: Tom Baeyens
            Priority: Critical


If an action in a process definition throws an exception it doesn't correctly reach the client class, e.g. the class doing the signalling. 

Imagine that you have a process definition that in one of the task as an action that opens a file for reading. If the file cannot be found there will be an exception. Te exception is thrown and when it reaches the class, where the code for signalling is, you can't see the exception message. If  you try to do, in the catch block, System.err.println(e.getMessage()) the result is null! However if you print System.err.println(e.getCause().getMessage()) the result is the file not found exception.

This is worst in the case when you caught the exception in the action delegated class and you throw your own exception by explicitly doing: throw new MyException("Some error"); and the message still is null.

In the case where the exception occurs in another class than the one of the action (if the execute code of the action invokes another class), even the code System.err.println(e.getCause().getMessage())  outputs null.

The documentattion clearly states in 9.7 Exception Handling:
"...Uncaught exceptions are thrown to the client (e.g. the client that called the token.signal()) or the exception is caught by a jBPM exception-handler. ..."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list