ExceptionHandler class

Handles exceptions of type exception (and its subtypes) thrown by any route.

Valid signatures: DianaResponse on(MyException e) or DianaResponse on(MyException e, DianaRequest req), optionally async. When several handlers match, the most specific exception type wins.

Annotations
  • @Target.new({TargetKind.method})

Constructors

ExceptionHandler(Type exception)
const

Properties

exception → Type
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited