class UncaughtThrowable
Hierarchy
- class \Revolt\EventLoop\UncaughtThrowable extends \Revolt\EventLoop\Error
Expanded class hierarchy of UncaughtThrowable
1 file declares its use of UncaughtThrowable
- AbstractDriver.php in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ UncaughtThrowable.php, line 9
Namespace
Revolt\EventLoopView source
final class UncaughtThrowable extends \Error {
public static function throwingCallback(\Closure $closure, \Throwable $previous) : self {
return new self("Uncaught %s thrown in event loop callback %s; use Revolt\\EventLoop::setErrorHandler() to gracefully handle such exceptions%s", $closure, $previous);
}
public static function throwingErrorHandler(\Closure $closure, \Throwable $previous) : self {
return new self("Uncaught %s thrown in event loop error handler %s%s", $closure, $previous);
}
private function __construct(string $message, \Closure $closure, \Throwable $previous) {
parent::__construct(\sprintf($message, \str_replace("\x00", '@', \get_class($previous)), ClosureHelper::getDescription($closure), $previous->getMessage() !== '' ? ': ' . $previous->getMessage() : ''), 0, $previous);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UncaughtThrowable::throwingCallback | public static | function | |
UncaughtThrowable::throwingErrorHandler | public static | function | |
UncaughtThrowable::__construct | private | function |