Petals CDK

The method Exchange#setError( Exception ) is painful

Details

  • Type: Improvement Request Improvement Request
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 5.1
  • Fix Version/s: 5.1.1
  • Component/s: Utils
  • Security Level: Public
  • Description:
    Hide

    Because of the Java doc of this method, completed by the wiki, I think this method should be changed, by raising the limitation on the exception type

    Keep MessageExchange#setError( Exception ), as stated by the JBI specification.
    And implement Exchange#setError( Exception ) with:

    if (exception instanceof MessagingException 
                || ename.startsWith("java.")
                || ename.startsWith("org.w3c.")
                || ename.startsWith("org.xml.")) {
         exchange.setError(exception);
    
    } else {
         MessagingException msgException = new MessagingException(ExceptionUtil
                  .getExtendedMessage(exception));
         exchange.setError(msgException);
    }

    That would be useful in the developer kit.

    Show
    Because of the Java doc of this method, completed by the wiki, I think this method should be changed, by raising the limitation on the exception type Keep MessageExchange#setError( Exception ), as stated by the JBI specification. And implement Exchange#setError( Exception ) with:
    if (exception instanceof MessagingException 
                || ename.startsWith("java.")
                || ename.startsWith("org.w3c.")
                || ename.startsWith("org.xml.")) {
         exchange.setError(exception);
    
    } else {
         MessagingException msgException = new MessagingException(ExceptionUtil
                  .getExtendedMessage(exception));
         exchange.setError(msgException);
    }
    That would be useful in the developer kit.
  • Environment:
    All.

Activity

Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
13h 26m
1
Roland Naudin
Fri, 22 Oct 2010 - 09:38:25 +0200
Open Open In Progress In Progress
5d 1h 35m
1
Mathieu Carrolle
Wed, 27 Oct 2010 - 11:14:11 +0200
In Progress In Progress Resolved Resolved
7m 23s
1
Mathieu Carrolle
Wed, 27 Oct 2010 - 11:21:34 +0200
Resolved Resolved Closed Closed
7s
1
Mathieu Carrolle
Wed, 27 Oct 2010 - 11:21:41 +0200

People

Dates

  • Created:
    Thu, 21 Oct 2010 - 20:12:20 +0200
    Updated:
    Wed, 27 Oct 2010 - 11:21:41 +0200
    Resolved:
    Wed, 27 Oct 2010 - 11:21:34 +0200