com.vaadin.flow.server.
Class DefaultErrorHandler
All Implemented Interfaces:
The default implementation of ErrorHandler
.
This implementation logs the exception at ERROR level, unless the exception
is in the ignore list.
By default, the following exceptions are ignored to prevent logs to be
flooded by errors that are usually not raised by application logic, but are
caused by external event, such as broken connections or network issues.
- java.net.SocketException
- java.net.SocketTimeoutException
- java.io.EOFException
- org.apache.catalina.connector.ClientAbortException
- org.eclipse.jetty.io.EofException
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DefaultErrorHandler
(Set<String> ignoredExceptions) protected
DefaultErrorHandler
(Set<String> ignoredExceptions, Set<String> routeConfigurationExceptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
error
(ErrorEvent event) Invoked when an error occurs.
static Throwable
Vaadin wraps exceptions in its own and due to reflection usage there might be also other irrelevant exceptions that make no sense for Vaadin users (~developers using Vaadin).
protected boolean
-
Constructor Details
-
DefaultErrorHandler
-
DefaultErrorHandler
-
DefaultErrorHandler
public DefaultErrorHandler()
-
-
Method Details
-
error
Description copied from interface:
ErrorHandler
Invoked when an error occurs.
Specified by:
error
in interfaceErrorHandler
Parameters:
event
- the fired event. -
shouldHandle
-
findRelevantThrowable
Vaadin wraps exceptions in its own and due to reflection usage there might be also other irrelevant exceptions that make no sense for Vaadin users (~developers using Vaadin). This method tries to choose the relevant one to be reported.
Parameters:
t
- a throwable passed to ErrorHandlerReturns:
the throwable that is relevant for Vaadin users
-