Re: Factoring out exception Handling fragments.

2013-11-08 Thread Claus Ibsen
You can have a abstract base route builder class where you have shared onException and whatnot. And then just call super.configure() in your route classes On Thu, Nov 7, 2013 at 10:20 PM, kraythe . kray...@gmail.com wrote: Greetings, I have the following exception handling code on every route

Re: Factoring out exception Handling fragments.

2013-11-08 Thread kraythe .
Yeah I can inherit classes but I don't see where that gets me anywhere. How to I declare the onException part and then use it in a route later? I know the route DSL just builds a map that is later instantiated by the camel engine. I want to build a part and then use it. Something like this:

Re: Factoring out exception Handling fragments.

2013-11-08 Thread Taariq Levack
An abstract CXF route builder for example can handle all exceptions in a certain way. No need to mention it in the subclass, just call super.configure() where you have the onException Taariq On 08 Nov 2013, at 16:52, kraythe . kray...@gmail.com wrote: Yeah I can inherit classes but I

Factoring out exception Handling fragments.

2013-11-07 Thread kraythe .
Greetings, I have the following exception handling code on every route that I make. Since it is cut and paste I would love to factor it out into some kind of route fragment that I could use in each route that is using it. Any suggestions on how I could go about this? Direct wont work and the error