set500 method

void set500(
  1. dynamic handler(
    1. HttpRequest request,
    2. Object error
    )
)

Sets a custom 500 error handler. The handler is called with the original HttpRequest and the error object as arguments. The handler is responsible for writing a response to the client and closing the request.

Implementation

void set500(Function(HttpRequest request, Object error) handler) {
  _custom500 = handler;
}