users@jersey.java.net

Re: [Jersey] Re: Jersey and runtime exception handling

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Thu, 2 Sep 2010 15:11:18 +0200

On Sep 1, 2010, at 7:36 PM, DaHoopster wrote:

>
> Hi Alex,
>
> Thanks for the reply. I like your solution but what I need is a really
> simple catch-all to catch all runtime exceptions so that a
> meaningful XML is
> returned instead of the default HTML error page. I think I will have
> an
> ExceptionMapper that maps to RuntimeException.
>

It may be prudent to map Throwable if you need a catch any runtime
exceptions and any checked exceptions thrown by the application.

Paul.