com.vaadin.flow.router.

Interface HasErrorParameter<T extends Exception>

  • Type Parameters:

    T - type Exception type handled

    All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    InternalServerError, RouteNotFoundError

    Functional Interface:

    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface HasErrorParameter<T extends Exception>
    extends Serializable

    Interface for defining a view that handles the exceptions for the set Exception type T.

    Since:

    1.0

    Author:

    Vaadin Ltd

    • Method Detail

      • setErrorParameter

        int setErrorParameter(BeforeEnterEvent event,
                              ErrorParameter<T> parameter)

        Method called before rendering the exception view.

        Note! returned int should be a valid HttpServletResponse code

        Parameters:

        event - the before navigation event for this request

        parameter - error parameter containing custom exception and caught exception

        Returns:

        a valid HttpServletResponse code