org.apache.pekko.http.javadsl.server.ExceptionHandler
See theExceptionHandler companion object
Handles exceptions by turning them into routes. You can create an exception handler in Java code like the following example:
ExceptionHandler myHandler = ExceptionHandler.of (ExceptionHandler.newPFBuilder()
.match(IllegalArgumentException.class, x -> Directives.complete(StatusCodes.BAD_REQUEST))
.build()
));
Attributes
- Companion
- object
- Source
- ExceptionHandler.scala
- Graph
-
- Supertypes
Members list
In this article