Add a DataFormat programatically

2017-01-01 Thread Robert Huffman
I'm having trouble adding the ProtobufDataFormat to a route. I have ActiveMQ BytesMessages whose bodies are Protobuf messages. The documentation (http://camel.apache.org/protobuf.html) certainly looks straightforward, so here's what I have: ProtobufDataFormat protobufFormat = new ProtobufData

Handling errors

2017-01-03 Thread Robert Huffman
I'm having trouble understanding how to write and use an error handler. The use case is testing a custom Camel component. I would like to have an error handler that just collects any exceptions thrown by the endpoint's producer. I somewhat naively assumed this would be simple. I thought the Camel

Re: Handling errors

2017-01-03 Thread Robert Huffman
t; > On Tue, Jan 3, 2017 at 7:44 PM, Robert Huffman > wrote: > > I'm having trouble understanding how to write and use an error handler. > The > > use case is testing a custom Camel component. I would like to have an > error > > handler that just collects any exce

Re: Handling errors

2017-01-03 Thread Robert Huffman
ue, Jan 3, 2017 at 9:31 PM, Robert Huffman > wrote: > > Well, of course I read that, but all I want is access to the actual > > Exception objects in my test. I can add the try/catch clauses, but as > > nearly as I can tell the only thing you can do with the catch is route to &g

Re: Handling errors

2017-01-03 Thread Robert Huffman
y. // See http://camel.apache.org/why-is-the-exception-null-when-i-use-onexception.html e = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); } if (e != null) { exceptions.add(e); } } Thanks for the help. On Tue, Jan 3, 2017 at 2:31 PM, Robert Huffman wrote: > Ah, nic