Class MockRouteNotFoundError

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.router.AbstractRouteNotFoundError
com.vaadin.flow.router.RouteNotFoundError
com.vaadin.browserless.internal.MockRouteNotFoundError
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.router.HasErrorParameter<com.vaadin.flow.router.NotFoundException>, Serializable

@Tag("div") @DefaultErrorHandler public class MockRouteNotFoundError extends com.vaadin.flow.router.RouteNotFoundError
This route gets registered by default in Routes, so that Browserless Testing can catch any navigation to a missing route and can respond with an informative exception.

For internal use only. May be renamed or removed in a future release.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.router.AbstractRouteNotFoundError

    com.vaadin.flow.router.AbstractRouteNotFoundError.CopilotJs
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the error view.
  • Method Summary

    Modifier and Type
    Method
    Description
    final com.vaadin.flow.router.NotFoundException
    Returns the exception describing the failed navigation, set by setErrorParameter(BeforeEnterEvent, ErrorParameter).
    final void
    setCause(com.vaadin.flow.router.NotFoundException cause)
    Sets the exception describing the failed navigation.
    int
    setErrorParameter(com.vaadin.flow.router.BeforeEnterEvent event, com.vaadin.flow.router.ErrorParameter<com.vaadin.flow.router.NotFoundException> parameter)
     

    Methods inherited from class com.vaadin.flow.router.AbstractRouteNotFoundError

    setRouteNotFoundErrorParameter

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, getUIOrThrow, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttached

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Constructor Details

    • MockRouteNotFoundError

      public MockRouteNotFoundError()
      Creates the error view.
  • Method Details

    • getCause

      public final com.vaadin.flow.router.NotFoundException getCause()
      Returns the exception describing the failed navigation, set by setErrorParameter(BeforeEnterEvent, ErrorParameter).
      Returns:
      the exception, or null if no navigation failed yet.
    • setCause

      public final void setCause(com.vaadin.flow.router.NotFoundException cause)
      Sets the exception describing the failed navigation.
      Parameters:
      cause - the exception, may be null.
    • setErrorParameter

      public int setErrorParameter(com.vaadin.flow.router.BeforeEnterEvent event, com.vaadin.flow.router.ErrorParameter<com.vaadin.flow.router.NotFoundException> parameter)
      Specified by:
      setErrorParameter in interface com.vaadin.flow.router.HasErrorParameter<com.vaadin.flow.router.NotFoundException>
      Overrides:
      setErrorParameter in class com.vaadin.flow.router.RouteNotFoundError