Package com.vaadin.server
Class ErrorEvent
- java.lang.Object
-
- com.vaadin.server.ErrorEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientConnector.ConnectorErrorEvent
public class ErrorEvent extends Object implements Serializable
An error thrown by the framework and handled by anErrorHandler
. Typically handled byVaadinSession.getErrorHandler()
but can also be handled by aConnector
specific handler, set usingClientConnector.setErrorHandler(ErrorHandler)
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ErrorEvent(Throwable t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorHandler
findErrorHandler(ClientConnector connector)
Method for finding the error handler for the given connector.static ErrorHandler
findErrorHandler(VaadinSession session)
Method for finding the error handler for the given session.Throwable
getThrowable()
Gets the contained throwable, the cause of the error.void
setThrowable(Throwable throwable)
-
-
-
Constructor Detail
-
ErrorEvent
public ErrorEvent(Throwable t)
-
-
Method Detail
-
getThrowable
public Throwable getThrowable()
Gets the contained throwable, the cause of the error.- Returns:
-
setThrowable
public void setThrowable(Throwable throwable)
-
findErrorHandler
public static ErrorHandler findErrorHandler(ClientConnector connector)
Method for finding the error handler for the given connector. Uses connector hierarchy to find a connector with an error handler. Falls back to the VaadinSession error handler if no connector has specified an error handler.Returns a
DefaultErrorHandler
if no error handler was found- Parameters:
connector
- The target connector- Returns:
- An ErrorHandler for the connector
-
findErrorHandler
public static ErrorHandler findErrorHandler(VaadinSession session)
Method for finding the error handler for the given session.- Parameters:
connector
- The target connector- Returns:
- An ErrorHandler for the session or null if none was found
-
-