Documentation

ExceptionBehavior

Table of Contents

setExceptionBehavior()  : void
classifyErrorSeverity()  : array<string|int, mixed>
logError()  : void
registerExceptionHandler()  : void
Logs uncaught throwables and dispatches rendering. When Whoops is active we invoke it directly so it receives the full throwable — re-throwing hands off to PHP's default fatal display, after which Whoops only sees the tail via `handleShutdown()` and loses every vendor/framework frame.
registerWhoopsHandler()  : void

Methods

setExceptionBehavior()

public setExceptionBehavior([int|null $state = null ]) : void
Parameters
$state : int|null = null
Return values
void

classifyErrorSeverity()

private static classifyErrorSeverity(int $severity) : array<string|int, mixed>
Parameters
$severity : int
Return values
array<string|int, mixed>

logError()

private static logError(int $severity, string $message, string $file, int $line) : void
Parameters
$severity : int
$message : string
$file : string
$line : int
Return values
void

registerExceptionHandler()

Logs uncaught throwables and dispatches rendering. When Whoops is active we invoke it directly so it receives the full throwable — re-throwing hands off to PHP's default fatal display, after which Whoops only sees the tail via `handleShutdown()` and loses every vendor/framework frame.

private static registerExceptionHandler() : void

Do NOT pair this with restore_exception_handler(): on PHP >= 8.3 the combination recurses on the re-thrown throwable until zend.max_allowed_stack_size trips.

Return values
void

registerWhoopsHandler()

private registerWhoopsHandler() : void
Return values
void

Search results