On Aug 22, 2012, at 11:59 AM, Bill Burke wrote:
> Maybe this might simplify things?
>
> If exception thrown from resource method
> - ExceptioMapper
> - response filters and interception if there is an entity.
>
> If an exception thrown in response filter (or WriterInterceptor)
> - ExceptionMapper
> - no additional filtering or interception.
How about this variation? Exception in:
(1) Pre-match request filter or Response filter or Writer Interceptor
-> Exception Mapper -> Response
(2) Post-match request filter or Resource method or Reader interceptor
-> Exception Mapper -> Response chain -> Response
Notes:
- If abortWith(Response) called in pre-match then (1)
- If abortWith(Response) called in post-match then (2)
- Writer interceptors executed after Exception Mapper
- At most one Exception Mapper can be used per request/response (no loops)
- No such thing as pre-match response filter
-- Santiago