[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 798 lines (30 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ErrorHandler:: (18 methods):
register()
call()
__construct()
setDefaultLogger()
setLoggers()
setExceptionHandler()
throwAt()
scopeAt()
traceAt()
screamAt()
reRegister()
handleError()
handleException()
handleFatalError()
renderException()
getErrorEnhancers()
cleanTrace()
parseAnonymousClass()
Class: ErrorHandler - X-Ref
A generic ErrorHandler for the PHP engine.register(self $handler = null, bool $replace = true) X-Ref |
Registers the error handler. |
call(callable $function, ...$arguments) X-Ref |
Calls a function and turns any PHP error into \ErrorException. return: mixed What $function(...$arguments) returns |
__construct(BufferingLogger $bootstrappingLogger = null, bool $debug = false) X-Ref |
No description |
setDefaultLogger(LoggerInterface $logger, $levels = \E_ALL, bool $replace = false) X-Ref |
Sets a logger to non assigned errors levels. param: LoggerInterface $logger A PSR-3 logger to put as default for the given levels param: array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants param: bool $replace Whether to replace or not any existing logger |
setLoggers(array $loggers) X-Ref |
Sets a logger for each error level. param: array $loggers Error levels to [LoggerInterface|null, LogLevel::*] map return: array The previous map |
setExceptionHandler(?callable $handler) X-Ref |
Sets a user exception handler. param: callable(\Throwable $e)|null $handler return: callable|null The previous exception handler |
throwAt(int $levels, bool $replace = false) X-Ref |
Sets the PHP error levels that throw an exception when a PHP error occurs. param: int $levels A bit field of E_* constants for thrown errors param: bool $replace Replace or amend the previous value return: int The previous value |
scopeAt(int $levels, bool $replace = false) X-Ref |
Sets the PHP error levels for which local variables are preserved. param: int $levels A bit field of E_* constants for scoped errors param: bool $replace Replace or amend the previous value return: int The previous value |
traceAt(int $levels, bool $replace = false) X-Ref |
Sets the PHP error levels for which the stack trace is preserved. param: int $levels A bit field of E_* constants for traced errors param: bool $replace Replace or amend the previous value return: int The previous value |
screamAt(int $levels, bool $replace = false) X-Ref |
Sets the error levels where the @-operator is ignored. param: int $levels A bit field of E_* constants for screamed errors param: bool $replace Replace or amend the previous value return: int The previous value |
reRegister(int $prev) X-Ref |
Re-registers as a PHP error handler if levels changed. |
handleError(int $type, string $message, string $file, int $line) X-Ref |
Handles errors by filtering then logging them according to the configured bit fields. return: bool Returns false when no handling happens so that the PHP engine can handle the error itself |
handleException(\Throwable $exception) X-Ref |
Handles an exception by logging then forwarding it to another handler. |
handleFatalError(array $error = null) X-Ref |
Shutdown registered function for handling PHP fatal errors. param: array|null $error An array as returned by error_get_last() |
renderException(\Throwable $exception) X-Ref |
Renders the given exception. As this method is mainly called during boot where nothing is yet available, the output is always either HTML or CLI depending where PHP runs. |
getErrorEnhancers() X-Ref |
Override this method if you want to define more error enhancers. return: ErrorEnhancerInterface[] |
cleanTrace(array $backtrace, int $type, string &$file, int &$line, bool $throw) X-Ref |
Cleans the trace by removing function arguments and the frames added by the error handler and DebugClassLoader. |
parseAnonymousClass(string $message) X-Ref |
Parse the error message by removing the anonymous class notation and using the parent class instead if possible. |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |