ErrorHandlerInterface
Error handler interface for TYPO3
This file is a backport from TYPO3 Flow
Table of Contents
Constants
- ERROR_HANDLED = true
- PROPAGATE_ERROR = false
Methods
- __construct() : mixed
- Registers this class as default error handler
- handleError() : bool
- Handles an error.
- setExceptionalErrors() : mixed
- Defines which error levels should result in an exception thrown.
Constants
ERROR_HANDLED
public
mixed
ERROR_HANDLED
= true
PROPAGATE_ERROR
public
mixed
PROPAGATE_ERROR
= false
Methods
__construct()
Registers this class as default error handler
public
__construct(int $errorHandlerErrors) : mixed
If dependencies need to be added using injector methods, the error handler may also be registered later on, within the optional registerErrorHandler() method.
Parameters
- $errorHandlerErrors : int
-
The integer representing the E_* error level which should be
handleError()
Handles an error.
public
handleError(int $errorLevel, string $errorMessage, string $errorFile, int $errorLine) : bool
If the error is registered as exceptionalError it will by converted into an exception, to be handled by the configured exceptionhandler. Additionally the error message is written to the configured logs. If application is backend, the error message is also added to the flashMessageQueue, in frontend the error message is displayed in the admin panel (as TsLog message).
Parameters
- $errorLevel : int
-
The error level - one of the E_* constants
- $errorMessage : string
-
The error message
- $errorFile : string
-
Name of the file the error occurred in
- $errorLine : int
-
Line number where the error occurred
Tags
Return values
boolsetExceptionalErrors()
Defines which error levels should result in an exception thrown.
public
setExceptionalErrors(int $exceptionalErrors) : mixed
Parameters
- $exceptionalErrors : int
-
The integer representing the E_* error level to handle as exceptions