ErrorHandler
class ErrorHandler
Error handler.
Properties
| protected Container | $container | Container. | |
| protected bool | $disableShutdownHandler | Is the shutdown handler disabled? | |
| protected array | $handlers | Exception handlers. | |
| protected Closure|LoggerInterface | $logger | Logger instance. | |
| protected array | $dontLog | Exception types that shouldn't be logged. | 
Methods
Should errors be displayed?
Write to output.
Returns the fallback handler.
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 82
                            
    __construct(Container|null $container = null)
        
    
    Constructor.
        at         line 100
                    protected        bool
    displayErrors()
        
    
    Should errors be displayed?
        at         line 117
                    protected        
    write(string $output)
        
    
    Write to output.
        at         line 134
                    protected        Closure
    getFallbackHandler()
        
    
    Returns the fallback handler.
        at         line 150
                    protected        
    register()
        
    
    Registers the exception handler.
        at         line 174
                            
    setLogger(Closure|LoggerInterface $logger)
        
    
    Set logger instance or closure that returns a logger instance.
        at         line 184
                            LoggerInterface
    getLogger()
        
    
    Return logger instance.
        at         line 199
                            
    dontLog(string|array $exceptionType)
        
    
    Disables logging for an exception type.
        at         line 207
                            
    disableShutdownHandler()
        
    
    Disables the shutdown handler.
        at         line 218
                            
    handle(string $exceptionType, string|Closure $handler)
        
    
    Prepends an exception handler to the stack.
        at         line 228
                            
    clearHandlers(string $exceptionType)
        
    
    Clears all error handlers for an exception type.
        at         line 245
                            
    replaceHandlers(string $exceptionType, Closure $handler)
        
    
    Replaces all error handlers for an exception type with a new one.
        at         line 255
                    protected        
    clearOutputBuffers()
        
    
    Clear output buffers.
        at         line 266
                    protected        bool
    shouldExceptionBeLogged(Throwable $exception)
        
    
    Should the exception be logged?
        at         line 290
                    protected        HandlerInterface
    handlerFactory(string $handler)
        
    
    Creates and returns an error handler instance.
        at         line 302
                    protected        mixed
    handleException(string|Closure $handler, Throwable $exception)
        
    
    Handle the exception.
        at         line 317
                            
    handler(Throwable $exception)
        
    
    Handles uncaught exceptions.