BeanProcessor - wrapping throwable why?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

BeanProcessor - wrapping throwable why?

Claus Ibsen
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

Reply | Threaded
Open this post in threaded view
|

Re: BeanProcessor - wrapping throwable why?

gertv
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
>
>
>