Interop\Async\Loop\Driver::setErrorHandler PHP Method

setErrorHandler() abstract public method

The callback receives the error as the first and only parameter. The return value of the callback gets ignored. If it can't handle the error, it MUST throw the error. Errors thrown by the callback or during its invocation MUST be thrown into the run loop and stop the driver. Subsequent calls to this method will overwrite the previous handler.
abstract public setErrorHandler ( callable $callback = null ) : void
$callback callable
return void
    public abstract function setErrorHandler(callable $callback = null);