Module io.avaje.jex
Package io.avaje.jex

Interface ErrorHandling


  • public interface ErrorHandling
    • Method Detail

      • error

        ErrorHandling error​(int statusCode,
                            Handler handler)
        Adds an error mapper to the instance. Useful for turning error-codes (404, 500) into standardized messages/pages
      • error

        ErrorHandling error​(int statusCode,
                            String contentType,
                            Handler handler)
        Adds an error mapper for the specified content-type to the instance. Useful for turning error-codes (404, 500) into standardized messages/pages
      • find

        <T extends ExceptionExceptionHandler<Exception> find​(Class<T> exceptionType)
        Return a registered exception handler given the exception type or null if one is not found.

        This includes searching the super types of the exception.