ServerErrors class abstract final

Where errors that escape a handler are reported.

Router(onError:) installs a reporter for the requests that router serves, scoped to a zone rather than to the process. Two routers in one isolate, which is normal in tests and in anything serving several ports, keep their own sinks.

ServerErrors.reporter = (error, stack) => log.severe('handler failed', error);

Properties

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

Static Properties

reporter ↔ void Function(Object error, StackTrace stack)?
The reporter for the current zone, or the process-wide one.
getter/setter pair

Static Methods

report(Object error, StackTrace stack) → void
Reports an error that escaped a handler.
runWith<R>(void sink(Object error, StackTrace stack), R body()) → R
Runs body with sink as the reporter for everything it awaits.