You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <ci...@silverbullet.dk> on 2008/10/11 11:48:22 UTC
BeanProcessor - wrapping throwable why?
Hi
The process() method in BeanProcessor has try .. catch that catches Throwable and rethrows it as Exception.
This is wrong as java.lang.Error shouldn't really be caught / hidden.
I do think the catches should be removed and just let the original exception being thrown.
Any thoughts?
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
Re: BeanProcessor - wrapping throwable why?
Posted by Gert Vanthienen <ge...@skynet.be>.
Claus,
I don't see any reason to catch/wrap/rethrow a plain Exception/Throwable
at that point either.
+1 on removing the catch clauses for Exception & Throwable
Gert
Claus Ibsen wrote:
> Hi
>
> The process() method in BeanProcessor has try .. catch that catches Throwable and rethrows it as Exception.
>
> This is wrong as java.lang.Error shouldn't really be caught / hidden.
>
> I do think the catches should be removed and just let the original exception being thrown.
>
> Any thoughts?
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
>
>