Hi,
Given the discussions around JAXB and exception mapping i thought it
appropriate to clean up the throwing of exceptions from the Jersey
supplied readers/writers. From the commit log:
- Cleaned up the throwing of exceptions by message body readers and
writers.
If a known checked, or documented runtime, exception is thrown when
reading then a WebApplcationException is thrown with the cause.
If the
exception is related to reading then a 400 (Client error) status
code is
set, otherwise a 500 (Internal server error) status code is set.
If a known checked, or documented runtime, exception is thrown when
writing then a WebApplcationException is thrown with the cause
and a
500 (Internal server error) status code is set
I think the next thing to do is enable buffering of a response if one
wants to catch exceptions and produce an appropriate HTTP response
when writing.
Paul.