‪TYPO3CMS  ‪main
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)
 

Public Attributes

const ERROR_HANDLED = true
 
const PROPAGATE_ERROR = false
 

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 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
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.

Referenced by TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest\errorHandlerLogsCorrectly().

◆ 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.

Referenced by TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest\errorHandlerLogsCorrectly().

Member Data Documentation

◆ ERROR_HANDLED

const TYPO3\CMS\Core\Error\ErrorHandlerInterface::ERROR_HANDLED = true

◆ PROPAGATE_ERROR

const TYPO3\CMS\Core\Error\ErrorHandlerInterface::PROPAGATE_ERROR = false