Package io.undertow.servlet.api
Class LoggingExceptionHandler
- java.lang.Object
-
- io.undertow.servlet.api.LoggingExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler
public class LoggingExceptionHandler extends java.lang.Object implements ExceptionHandler
An exception handler that- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LoggingExceptionHandler.Builder
-
Field Summary
Fields Modifier and Type Field Description static LoggingExceptionHandler
DEFAULT
-
Constructor Summary
Constructors Constructor Description LoggingExceptionHandler(java.util.Map<java.lang.Class<? extends java.lang.Throwable>,io.undertow.servlet.api.LoggingExceptionHandler.ExceptionDetails> exceptionDetails)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggingExceptionHandler.Builder
builder()
boolean
handleThrowable(io.undertow.server.HttpServerExchange exchange, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, java.lang.Throwable t)
Handles an exception.
-
-
-
Field Detail
-
DEFAULT
public static final LoggingExceptionHandler DEFAULT
-
-
Method Detail
-
handleThrowable
public boolean handleThrowable(io.undertow.server.HttpServerExchange exchange, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, java.lang.Throwable t)
Description copied from interface:ExceptionHandler
Handles an exception. If this method returns true then the request/response cycle is considered to be finished, and no further action will take place, if this returns false then standard error page redirect will take place. The default implementation of this simply logs the exception and returns false, allowing error page and async context error handling to proceed as normal.- Specified by:
handleThrowable
in interfaceExceptionHandler
- Parameters:
exchange
- The exchangerequest
- The requestresponse
- The responset
- The exception- Returns:
true
true if the error was handled by this method
-
builder
public static LoggingExceptionHandler.Builder builder()
-
-