This method is called upon any exception being thrown within the server's request processing code. This includes
any exceptions thrown within resource provider methods (e.g.
Search and
Read methods) as well as
any runtime exceptions thrown by the server itself. This method is invoked for each interceptor (until one of them
returns a non-
null
response or the end of the list is reached), after which
#handleException(RequestDetails,BaseServerResponseException,HttpServletRequest,HttpServletResponse) is
called for each interceptor.
This may be used to add an OperationOutcome to a response, or to convert between exception types for any reason.
Implementations of this method may choose to ignore/log/count/etc exceptions, and return null
. In
this case, processing will continue, and the server will automatically generate an
BaseOperationOutcome. Implementations may also choose to provide their own response to the client. In this case, they
should return a non-null
, to indicate that they have handled the request and processing should stop.