You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by gdenton <gr...@zooml.com> on 2013/04/10 23:13:24 UTC

Exception handling with exception super class in jax-rs

I would like to handle all exceptions from a jax-rs service in one method.
I've looked at interceptors but have not had any luck. Note that the
ExceptionMapper will not work as that requires a concrete exception class.

Using cxf 2.7.3.

Thanks.



--
View this message in context: http://cxf.547215.n5.nabble.com/Exception-handling-with-exception-super-class-in-jax-rs-tp5726143.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Exception handling with exception super class in jax-rs

Posted by gdenton <gr...@zooml.com>.
Doh! Didn't have the bean under jaxrs:providers. Thanks.



--
View this message in context: http://cxf.547215.n5.nabble.com/Exception-handling-with-exception-super-class-in-jax-rs-tp5726143p5726179.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Exception handling with exception super class in jax-rs

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 10/04/13 22:13, gdenton wrote:
> I would like to handle all exceptions from a jax-rs service in one method.
> I've looked at interceptors but have not had any luck. Note that the
> ExceptionMapper will not work as that requires a concrete exception class.
>
> Using cxf 2.7.3.
You can have ExceptionMapper<Throwable> or 
ExceptionMapper<RuntimeException> and it will catch all the exceptions...

Cheers, Sergey
>
> Thanks.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Exception-handling-with-exception-super-class-in-jax-rs-tp5726143.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com