ProductionErrorHandler
- Full name:
\Qubus\Error\Handlers\ProductionErrorHandler
- This class is marked as final and can't be subclassed
- This class implements:
\Qubus\Error\Handlers\ErrorHandler
- This class is a Final class
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
ERROR_HANDLER | public | 'registerErrorHandler' | |
EXCEPTION_HANDLER | public | 'registerExceptionHandler' | |
SHUTDOWN_HANDLER | public | 'registerShutdownHandler' |
Properties
loggers
displayErrors
notifyPsr3Loggers
notifyNativePhpLog
Methods
__construct
public __construct(bool $displayErrors = false, bool $notifyPsr3Loggers = false, bool $notifyNativePhpLog = true): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$displayErrors | bool | |
$notifyPsr3Loggers | bool | |
$notifyNativePhpLog | bool |
addLogger
Adds a logger to the ExceptionHandler.
Parameters:
Parameter | Type | Description |
---|---|---|
$logger | \Psr\Log\LoggerInterface |
log
Logs an error to PHP's native error_log() and PSR3 loggers.
Parameters:
Parameter | Type | Description |
---|---|---|
$throwable | \Throwable | |
$isEmergency | bool | Used only for uncaught exceptions. |
registerErrorHandler
Converts php notices/warnings/errors to ErrorException and throws it.
Parameters:
Parameter | Type | Description |
---|---|---|
$errno | int | |
$errstr | string | |
$errfile | string | |
$errline | int |
Throws:
registerExceptionHandler
Handle uncaught exceptions.
Parameters:
Parameter | Type | Description |
---|---|---|
$throwable | \Throwable |
Throws:
registerShutdownHandler
When php shuts down, check if this is caused by a(n) (fatal) error.
If so convert and catch it to have it processed like the rest of the exceptions.
Throws:
registerAllHandlers
unregister
De-registers the error handling functions, returning them to their previous state.
Automatically generated on 2025-10-13