dev@jsr311.java.net

Re: JSR311: Exception Handling

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Mon, 07 Apr 2008 10:46:08 +0200

Hi Marc,
> a bit indirect but I think you can use reflection to find the
> toResponse method of the mapper class and from that the type of the
> exception parameter. That should be all you need.
Sorry, you are right. My bug.
>> IMO a special handling is only useful for WebApplciationExceptions
>> (to be mapped as every WebApplicationException), but theoretical this
>> is not allowed, but may occur.
> I didn't understand your last bullet point, could you explain a bit more.
A valueOf(String) or a constructor with String arg to be used for
@*Param converting could throw exceptions, also a
WebApplicationException. For WebAppExcs it is perhaps useful to map them
to the response. For all other exceptions it is IMO not useful to use
exception mappers.

Stephan