Class DefaultNuxeoExceptionHandler

    • Constructor Detail

      • DefaultNuxeoExceptionHandler

        public DefaultNuxeoExceptionHandler()
    • Method Detail

      • startHandlingException

        protected void startHandlingException​(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response,
                                              Throwable t)
                                       throws javax.servlet.ServletException
        Puts a marker in request to avoid looping over the exception handling mechanism
        Throws:
        javax.servlet.ServletException - if request has already been marked as handled. The initial exception is then wrapped.
      • handleAnonymousException

        public boolean handleAnonymousException​(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
                                         throws IOException,
                                                javax.servlet.ServletException
        Description copied from interface: NuxeoExceptionHandler
        Handles the Security Error when the user is anonymous.
        Specified by:
        handleAnonymousException in interface NuxeoExceptionHandler
        Returns:
        true if the Security Error is handled so that the calling method won't fallback on the default handler, false otherwise.
        Throws:
        IOException
        javax.servlet.ServletException
      • getPrincipal

        protected Principal getPrincipal​(javax.servlet.http.HttpServletRequest request)
      • writeExceptionAsJson

        protected void writeExceptionAsJson​(javax.servlet.http.HttpServletResponse response,
                                            int status,
                                            Throwable e)
                                     throws IOException
        Throws:
        IOException
      • getExceptionMessage

        protected String getExceptionMessage​(String message,
                                             int status)