com.vaadin.server
Class ErrorEvent

java.lang.Object
  extended by com.vaadin.server.ErrorEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClientConnector.ConnectorErrorEvent

public class ErrorEvent
extends java.lang.Object
implements java.io.Serializable

An error thrown by the framework and handled by an ErrorHandler. Typically handled by VaadinSession.getErrorHandler() but can also be handled by a Connector specific handler, set using ClientConnector.setErrorHandler(ErrorHandler).

See Also:
Serialized Form

Constructor Summary
ErrorEvent(java.lang.Throwable t)
           
 
Method Summary
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.
 java.lang.Throwable getThrowable()
          Gets the contained throwable, the cause of the error.
 void setThrowable(java.lang.Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorEvent

public ErrorEvent(java.lang.Throwable t)
Method Detail

getThrowable

public java.lang.Throwable getThrowable()
Gets the contained throwable, the cause of the error.

Returns:

setThrowable

public void setThrowable(java.lang.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


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.