exceptionHandlerRaw property

ExceptionHandlerRaw exceptionHandlerRaw
getter/setter pair

Server exception/error handler (low-level)

Exception handler for situations where the high-level exceptionHandler is normally used, but it cannot be invoked. That is, if the exceptionHandler is not set, or a Woomera Request object is not available to pass to it (e.g. if the requestCreator function throws an exception).

An application can set this exception handler, to produce error pages that are consistent with the application's theme. But usually that is achieved by setting a the high-level exception handler, perhaps along with pipeline exception handlers.

This low-level exception handler is recommended if the application uses a custom requestCreator and it may raise exceptions.

The default is a built-in low-level exception handler that just produces a "text/plain" HTTP response with a one line message. That is functional, but not something a polished application would want its users to see. Therefore, an application should provide a low-level and/or a high-level exception handler. If only one is provided, unless there is a special need to handle exceptions raised by requestCreator the high-level one is probably better; since the application is using this package to avoid dealing with the low-level Dart HttpRequest.

This server raw exception handler can also be set using a @Handles.rawExceptions() annotation.

Implementation

ExceptionHandlerRaw exceptionHandlerRaw = _defaultRawExceptionHandler;