On 28/02/2008, Roman Kalukiewicz <[EMAIL PROTECTED]> wrote:
> 2008/2/28, cmdr <[EMAIL PROTECTED]>:
> >
> > Hi
>
> Hello!
>
>
> > I would like to send messages with exception trace
> >
> > exception(Exception.class).to("activemq:queue:Exception");
> >
> > from(XXX)
> > .process(new Processor()
> > {
> > public void process(Exchange exchange) throws Exception
> > {
> > throw new Exception("Processing Exception");
> > }
> > })
> > .to(XXX)
> >
> > I would like the activemq message to contain the exception message
>
>
> It looks that this exception is already associated with the exchange
> as a property named 'CamelCauseException'.
> What I think you should try, is to add
>
> .setHeader("exception", header("CamelCauseException"))
>
> to your exception handlig flow, so it will be used as an 'exception'
> property on JMS message. If it doesn't work you can try to explicitely
> use processor to extract the stacktrace from the exception.
>
> BTW. Maybe we could have converter toString(Throwable) to make it easier?
Good idea!
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com