Hi Sergey,

Thanks for pointing me in the right direction. I got most of what I need from this site:

http://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS

One last thing though, is it possible to remove the <Result> tags?

> Can you explain a bit more what exactly you're trying to do ?

To answer your question, the application is meant to suppress all RuntimeException with a more friendly message and forward that exception and the stacktrace to me. Also, to replace the error message to 400 instead of 500 for the checked exceptions.

Also, I am not sure where in the documentation it could be found, but I wasn't able to find how the mapper would be applied to the endpoint. I tried adding it as a provider and it worked. Not sure if this is the proper way, or I'm just lucky it worked.

Again, my thanks.

Gabo

Sergey Beryozkin wrote:
Hi Gabo

Can you explain a bit more what exactly you're trying to do ?
I think if you have a JAXRS ExceptionMapper for say CustomException which does extend RuntimeException then you'll know in this mapper's implementation what sort of exception it is...

But may be I'm missing something...

Cheers, Sergey


----- Original Message ----- From: "Gabo Manuel" <[email protected]>
To: <[email protected]>
Sent: Thursday, February 12, 2009 10:11 AM
Subject: [JAX-RS] Fault handling


Hi All,

I was just wondering if there is a possibility to acquire the actual Exception object, and maybe even replace it with another Exception through interceptors.

I was already able to change the response code (400 or 500) depending on whether the exception was a checked exception or not. I would however, prefer to be able to automatically notify some people for the unchecked exceptions. I tried printing all of the available content formats (message.getContentFormats()) to no avail.

Again, thanks in advance.

Gabo
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.0.234 / Virus Database: 270.10.23/1947 - Release Date: 02/11/09 18:11:00

Reply via email to