Interface MethodExceptionEventHandler

  • All Superinterfaces:
    EventHandler
    All Known Implementing Classes:
    PrintExceptions

    public interface MethodExceptionEventHandler
    extends EventHandler
    Event handler called when a method throws an exception. This gives the application a chance to deal with it and either return something nice, or throw. Please return what you want rendered into the output stream.
    Version:
    $Id: MethodExceptionEventHandler.java 685685 2008-08-13 21:43:27Z nbubna $
    • Method Detail

      • methodException

        java.lang.Object methodException​(java.lang.Class claz,
                                         java.lang.String method,
                                         java.lang.Exception e)
                                  throws java.lang.Exception
        Called when a method throws an exception. Only the first registered MethodExceptionEventHandler is called. If none are registered a MethodInvocationException is thrown.
        Parameters:
        claz - the class of the object the method is being applied to
        method - the method
        e - the thrown exception
        Returns:
        an object to insert in the page
        Throws:
        java.lang.Exception - an exception to be thrown instead inserting an object