ExceptionHandler

org.apache.pekko.http.javadsl.server.ExceptionHandler
See theExceptionHandler companion object
final class ExceptionHandler

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
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

"Seals" this handler by attaching a default handler as fallback if necessary.

"Seals" this handler by attaching a default handler as fallback if necessary.

Attributes

Source
ExceptionHandler.scala

Creates a new ExceptionHandler which uses the given one as fallback for this one.

Creates a new ExceptionHandler which uses the given one as fallback for this one.

Attributes

Source
ExceptionHandler.scala

Concrete fields