onError abstract method
The application-specific error handler to listen all uncaught errors
- that ever happen in this server.
- If the
connectargument is null, it means it is a server error, - or a uncaught error happening in an asynchronous operation.
- If not null, it means it is caused by an event handler or an event filter.
- Notice: all uncaught error will be handled automatically, such as
- closing up the connection, if any, and log the error message,
- Thus, you rarely need to register an error handler.
- Once
onErroris assigned, the default logging will be disabled, - i.e., it is
onError's job to log it.
Implementation
void onError(void onError(HttpConnect? connect, Object error, StackTrace? stackTrace)?);