Interface ErrorRouteInfo<T,R>

Type Parameters:
T - The target
R - The result
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, MethodBasedRouteInfo<T,R>, RequestMatcher, RouteInfo<R>
All Known Implementing Classes:
DefaultErrorRouteInfo

public interface ErrorRouteInfo<T,R> extends MethodBasedRouteInfo<T,R>, RequestMatcher
Represents a Route that matches an exception.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • originatingType

      Class<?> originatingType()
      Returns:
      The type the exception originates from. Null if the error route is global.
    • exceptionType

      Class<? extends Throwable> exceptionType()
      Returns:
      The type of exception
    • match

      Optional<RouteMatch<R>> match(Throwable exception)
      Match the given exception.
      Parameters:
      exception - The exception to match
      Returns:
      The route match
    • match

      Optional<RouteMatch<R>> match(Class<?> originatingClass, Throwable exception)
      Match the given exception.
      Parameters:
      originatingClass - The class where the error originates from
      exception - The exception to match
      Returns:
      The route match