3 Replies Latest reply on Jan 4, 2011 4:06 PM by futuredan

    How do I propogate an exception up a route?

    futuredan Newbie

      I have a piece of code like the following:


           boolean rc = this.myChannel.sendSync( teeXchg );

           teeStatus = teeXchg.getStatus();


      This sends the message to the following route:




      I have two problems.


      First, if I do not define an error handler in the fromXlat route (as shown above), processing does not stop and continues to the toXlat endpoint which I don't want.

      But even if I do that, I can't seem to get the onException triggered in the MessageProcessor route.


      Second, I need the first part fixed because I expect the status to be set to Error.

      Or at least for teeXchg.getError or getFault to be set, but they always seem to be set to null.


      What am I doing wrong?