ErrorHandler
class ErrorHandler
Error handler.
Properties
protected Container | $container | Container. | |
protected bool | $disableShutdownHandler | Is the shutdown handler disabled? | |
protected array | $handlers | Exception handlers. | |
protected LoggerInterface | $logger | Logger instance. | |
protected array | $disableLoggingFor | Exception types that shouldn't be logged. |
Methods
Adds basic fallback handler to the stack.
Registers the exception handler.
Return logger instance.
Disables logging for an exception type.
Disables the shutdown handler.
Clears all error handlers for an exception type.
Replaces all error handlers for an exception type with a new one.
Clear output buffers.
Creates and returns an error handler instance.
Details
at line 75
__construct(Container $container = null)
Constructor.
at line 91
protected
fallbackHandler()
Adds basic fallback handler to the stack.
at line 106
protected
register()
Registers the exception handler.
at line 132
setLogger(Closure|LoggerInterface $logger)
Set logger instance or closure that returns a logger instance.
at line 142
LoggerInterface
getLogger()
Return logger instance.
at line 157
disableLoggingFor(string|array $exceptionType)
Disables logging for an exception type.
at line 165
disableShutdownHandler()
Disables the shutdown handler.
at line 176
handle(string $exceptionType, string|Closure $handler)
Prepends an exception handler to the stack.
at line 186
clearHandlers(string $exceptionType)
Clears all error handlers for an exception type.
at line 203
replaceHandlers(string $exceptionType, Closure $handler)
Replaces all error handlers for an exception type with a new one.
at line 213
protected
clearOutputBuffers()
Clear output buffers.
at line 224
protected bool
shouldExceptionBeLogged(Throwable $exception)
Should the exception be logged?
at line 248
protected HandlerInterface
handlerFactory(string $handler)
Creates and returns an error handler instance.
at line 260
protected mixed
handleException(string|Closure $handler, Throwable $exception)
Handle the exception.
at line 275
handler(Throwable $exception)
Handles uncaught exceptions.