function AbstractDriver::error
Invokes the error handler with the given exception.
Parameters
\Throwable $exception The exception thrown from an event callback.:
2 calls to AbstractDriver::error()
- AbstractDriver::createCallbackFiber in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php - AbstractDriver::invokeMicrotasks in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php, line 394
Class
- AbstractDriver
- Event loop driver which implements all basic operations to allow interoperability.
Namespace
Revolt\EventLoop\InternalCode
protected final function error(\Closure $closure, \Throwable $exception) : void {
if ($this->errorHandler === null) {
// Explicitly override the previous interrupt if it exists in this case, hiding the exception is worse
$this->interrupt = static fn() => $exception instanceof UncaughtThrowable ? throw $exception : throw UncaughtThrowable::throwingCallback($closure, $exception);
return;
}
$fiber = new \Fiber($this->errorCallback);
/** @noinspection PhpUnhandledExceptionInspection */
$fiber->start($this->errorHandler, $exception);
}