public interface ErrorRoute extends MethodBasedRoute
Route that matches an exception.DEFAULT_PRODUCES| Modifier and Type | Method and Description | 
|---|---|
ErrorRoute | 
consumes(MediaType... mediaType)
Applies the given accepted media type the route. 
 | 
Class<? extends Throwable> | 
exceptionType()  | 
<T> Optional<RouteMatch<T>> | 
match(Class originatingClass,
     Throwable exception)
Match the given exception. 
 | 
<T> Optional<RouteMatch<T>> | 
match(Throwable exception)
Match the given exception. 
 | 
ErrorRoute | 
nest(Runnable nested)
Defines routes nested within this route. 
 | 
Class<?> | 
originatingType()  | 
ErrorRoute | 
where(Predicate<HttpRequest<?>> condition)
Match this  
Route only if the given predicate is true. | 
getTargetMethodacceptAll, body, body, getConsumes, getProduces, producesClass<?> originatingType()
<T> Optional<RouteMatch<T>> match(Throwable exception)
T - The typeexception - The exception to match<T> Optional<RouteMatch<T>> match(Class originatingClass, Throwable exception)
T - The typeoriginatingClass - The class where the error originates fromexception - The exception to matchErrorRoute consumes(MediaType... mediaType)
RouteErrorRoute nest(Runnable nested)
RouteErrorRoute where(Predicate<HttpRequest<?>> condition)
RouteRoute only if the given predicate is true.where in interface Routecondition - The condition which accepts a HttpRequest