Class ExceptionHandlingInterceptor

    • Method Detail

      • handleException

        public boolean handleException​(RequestDetails theRequestDetails,
                                       ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException,
                                       javax.servlet.http.HttpServletRequest theRequest,
                                       javax.servlet.http.HttpServletResponse theResponse)
                                throws javax.servlet.ServletException,
                                       IOException
        Throws:
        javax.servlet.ServletException
        IOException
      • preProcessOutgoingException

        public ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException preProcessOutgoingException​(RequestDetails theRequestDetails,
                                                                                                          Throwable theException,
                                                                                                          javax.servlet.http.HttpServletRequest theServletRequest)
                                                                                                   throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • setReturnStackTracesForExceptionTypes

        public ExceptionHandlingInterceptor setReturnStackTracesForExceptionTypes​(Class<?>... theExceptionTypes)
        If any server methods throw an exception which extends any of the given exception types, the exception stack trace will be returned to the user. This can be useful for helping to diagnose issues, but may not be desirable for production situations.
        Parameters:
        theExceptionTypes - The exception types for which to return the stack trace to the user.
        Returns:
        Returns an instance of this interceptor, to allow for easy method chaining.