users@jersey.java.net

ExceptionMapper matching

From: Andrew Ochsner <aochsner_at_cs.stanford.edu>
Date: Fri, 27 Mar 2009 10:18:15 -0600

Hi:

I have a set of ExceptionMappers that look for particular runtime exceptions
that i've created and maps them accordingly.

I'd also like a generic one that looks for RuntimeExceptions and strips out
the stack trace essentially.

If I create an ExceptionMapper that converts RuntimException, what happens
when I throw one of my specific ones for which there is a more specific
mapper for?

Sorry, hope that makes sense. Basically I want it to match as close as it
can so that the specific mappers i've written get used before the generic
RuntimeException mapper.

Can this work?