com.vaadin.flow.server.
Class AmbiguousRouteConfigurationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.vaadin.flow.server.InvalidRouteConfigurationException
-
- com.vaadin.flow.server.AmbiguousRouteConfigurationException
-
All Implemented Interfaces:
public class AmbiguousRouteConfigurationException extends InvalidRouteConfigurationException
Exception indicating that the application's routes already has the navigation target with the given path.
Since:
1.4
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor Description AmbiguousRouteConfigurationException​(String message, Class<? extends Component> navigationTarget)
Constructs a new invalid route configuration exception with the specified detail message and the existing navigation target component which already presents in the configuration with the route path.
-
Method Summary
All Methods Modifier and Type Method Description Class<? extends Component>
getConfiguredNavigationTarget()
Returns the already configured navigation target component class which caused the exception.
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AmbiguousRouteConfigurationException
public AmbiguousRouteConfigurationException​(String message, Class<? extends Component> navigationTarget)
Constructs a new invalid route configuration exception with the specified detail message and the existing navigation target component which already presents in the configuration with the route path.
Parameters:
message
- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.navigationTarget
- the configured navigation target, notnull
-
-
Method Detail
-
getConfiguredNavigationTarget
public Class<? extends Component> getConfiguredNavigationTarget()
Returns the already configured navigation target component class which caused the exception.
In case the exception happens as a result of a navigation target collision for the same route path this method returns the configured navigation target for the path.
Returns:
an optional existing navigation target in the configuration which caused the exception, or an empty optional if the exception is not caused by a collision, not
null
-
-