Class ExceptionHandlingInterceptor

java.lang.Object
ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor

  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • handleException

      public Object handleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException) 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

      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.