‪TYPO3CMS  10.4
TYPO3\CMS\Core\Error\ErrorHandlerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Error\ErrorHandlerInterface:
TYPO3\CMS\Core\Error\ErrorHandler

Public Member Functions

 __construct ($errorHandlerErrors)
 
 setExceptionalErrors ($exceptionalErrors)
 
bool handleError ($errorLevel, $errorMessage, $errorFile, $errorLine)
 

Detailed Description

Error handler interface for TYPO3

This file is a backport from TYPO3 Flow

Definition at line 23 of file ErrorHandlerInterface.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Error\ErrorHandlerInterface::__construct (   $errorHandlerErrors)

Registers this class as default error handler

If dependencies need to be added using injector methods, the error handler may also be registered later on, within the optional registerErrorHandler() method.

Parameters
int$errorHandlerErrors‪The integer representing the E_* error level which should be

Implemented in TYPO3\CMS\Core\Error\ErrorHandler.

Member Function Documentation

◆ handleError()

bool TYPO3\CMS\Core\Error\ErrorHandlerInterface::handleError (   $errorLevel,
  $errorMessage,
  $errorFile,
  $errorLine 
)

Handles an error. 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 TYPO3_MODE is 'BE' the error message is also added to the flashMessageQueue, in FE the error message is displayed in the admin panel (as TsLog message)

Parameters
int$errorLevel‪The error level - one of the E_* constants
string$errorMessage‪The error message
string$errorFile‪Name of the file the error occurred in
int$errorLine‪Line number where the error occurred
Returns
‪bool
Exceptions

Implemented in TYPO3\CMS\Core\Error\ErrorHandler.

◆ setExceptionalErrors()

TYPO3\CMS\Core\Error\ErrorHandlerInterface::setExceptionalErrors (   $exceptionalErrors)

Defines which error levels should result in an exception thrown.

Parameters
int$exceptionalErrors‪The integer representing the E_* error level to handle as exceptions

Implemented in TYPO3\CMS\Core\Error\ErrorHandler.