ExceptionHandler typedef Null safety

ExceptionHandler = FutureOr<void> Function(Context ctx, dynamic exception, StackTrace trace)

A function that shall be called when an exception occurs when processing a route.

exception is the exception that occurred. trace is the stack trace is the of the exception.


typedef FutureOr<void> ExceptionHandler(
    Context ctx, exception, StackTrace trace);