camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peninou (JIRA)" <>
Subject [jira] [Created] (CAMEL-10253) NullPointer in ThrowExceptionProcessor.getTraceLabel
Date Thu, 18 Aug 2016 15:26:22 GMT
peninou created CAMEL-10253:

             Summary: NullPointer in ThrowExceptionProcessor.getTraceLabel
                 Key: CAMEL-10253
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.17.3
            Reporter: peninou

When using
 throwException(Class<? extends Exception> type, String message) 
to define a Exception and having the tracing set to *True* in Camel context, if  an exception
occurred, it will call 

  public String getTraceLabel() {
        return "throwException[" + this.exception.getClass().getSimpleName() + "]";
But this.exception is null.
A patch could be:
    public String getTraceLabel() {
        String className= this.exception==null?this.type.getSimpleName():this.exception.getClass().getSimpleName();
        return "throwException[" + className + "]";

This message was sent by Atlassian JIRA

View raw message