Exception
class Exception extends Exception implements Throwable (View source)
Exception class.
Methods
__construct(string $message, int|string $code = 0, Throwable|null $previous = null)
Exception constructor.
string
__toString()
Returns a string representation of the exception object.
static void
Details
__construct(string $message, int|string $code = 0, Throwable|null $previous = null)
Exception constructor.
{@inheritDoc}
string
__toString()
Returns a string representation of the exception object.
static void
handle(Closure $callback, string|null $message = null, int $level = E_ALL)
Handles the passed callback in a safe context where PHP errors (and exceptions) result in exceptions that can be caught.
static never
throw(string $message, int|string $code = 0, Throwable|null $previous = null)
Throws an exception using the class this method was called on.