Exception mapping for runtime generated exceptions

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 14 Apr 2008 12:12:44 -0400

We've had several requests on the Jersey mailing lists for a way to
provide a default entity for certain status codes. We'd like to
propose that where the spec currently requires a particular status
code be returned, we instead require that a WebApplicationException
with the corresponding status and no entity be generated. In addition
we'd allow an application to provide an
ExceptionMapper<WebApplicationException> that would be used to map
instances of WebApplicationException that contain no entity.

Comments ?

Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.