ErrorHandler deprecated
class ErrorHandler extends ErrorHandler
deprecated
ErrorHandler.
Constants
TYPE_DEPRECATION |
|
Methods
Sets a logger to non assigned errors levels.
Sets a user exception handler.
Sets the PHP error levels that throw an exception when a PHP error occurs.
Sets the PHP error levels for which local variables are preserved.
Sets the PHP error levels for which the stack trace is preserved.
Sets the error levels where the @-operator is ignored.
Handles errors by filtering then logging them according to the configured bit fields.
Handles an exception by logging then forwarding it to another handler.
Shutdown registered function for handling PHP fatal errors.
Sets a logger for the given channel.
Details
in ErrorHandler at line line 121
static ErrorHandler
register(ErrorHandler|null|int $handler = null, bool $replace = true)
Registers the error handler.
in ErrorHandler at line line 156
__construct(BufferingLogger $bootstrappingLogger = null)
in ErrorHandler at line line 171
setDefaultLogger(LoggerInterface $logger, array|int $levels = null, bool $replace = false)
Sets a logger to non assigned errors levels.
in ErrorHandler at line line 205
array
setLoggers(array $loggers)
Sets a logger for each error level.
in ErrorHandler at line line 258
callable|null
setExceptionHandler(callable $handler)
Sets a user exception handler.
in ErrorHandler at line line 277
int
throwAt(int $levels, bool $replace = false)
Sets the PHP error levels that throw an exception when a PHP error occurs.
in ErrorHandler at line line 300
int
scopeAt(int $levels, bool $replace = false)
Sets the PHP error levels for which local variables are preserved.
in ErrorHandler at line line 319
int
traceAt(int $levels, bool $replace = false)
Sets the PHP error levels for which the stack trace is preserved.
in ErrorHandler at line line 338
int
screamAt(int $levels, bool $replace = false)
Sets the error levels where the @-operator is ignored.
in ErrorHandler at line line 379
bool
handleError($type, $message, $file, $line, array $context, array $backtrace = null)
Handles errors by filtering then logging them according to the configured bit fields.
in ErrorHandler at line line 525
handleException(Exception|Throwable $exception, array $error = null)
Handles an exception by logging then forwarding it to another handler.
in ErrorHandler at line line 592
static
handleFatalError(array $error = null)
Shutdown registered function for handling PHP fatal errors.
in ErrorHandler at line line 652
static
stackErrors()
Configures the error handler for delayed handling.
Ensures also that non-catchable fatal errors are never silenced.
As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724 PHP has a compile stage where it behaves unusually. To workaround it, we plug an error handler that only stacks errors for later.
The most important feature of this is to prevent autoloading until unstackErrors() is called.
in ErrorHandler at line line 660
static
unstackErrors()
Unstacks stacked errors and forwards to the logger.
in ErrorHandler at line line 705
setLevel(int|null $level)
deprecated
deprecated
Sets the level at which the conversion to Exception is done.
in ErrorHandler at line line 720
setDisplayErrors(int $displayErrors)
deprecated
deprecated
Sets the display_errors flag value.
in ErrorHandler at line line 741
static
setLogger(LoggerInterface $logger, string $channel = 'deprecation')
deprecated
deprecated
Sets a logger for the given channel.
in ErrorHandler at line line 766
handle($level, $message, $file = 'unknown', $line, $context = array())
deprecated
deprecated
in ErrorHandler at line line 778
handleFatal()
deprecated
deprecated
Handles PHP fatal errors.