TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Error\ErrorHandler Class Reference
Inheritance diagram for TYPO3\CMS\Core\Error\ErrorHandler:
TYPO3\CMS\Core\Error\ErrorHandlerInterface t3lib_error_ErrorHandler

Public Member Functions

 __construct ($errorHandlerErrors)
 
 setExceptionalErrors ($exceptionalErrors)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Error\ErrorHandlerInterface
 handleError ($errorLevel, $errorMessage, $errorFile, $errorLine)
 

Protected Member Functions

 writeLog ($logMessage, $severity)
 

Protected Attributes

 $exceptionalErrors = array()
 

Detailed Description

Global error handler for TYPO3

This file is a backport from FLOW3

Author
Rupert Germann rupi@.nosp@m.gmx..nosp@m.li

Definition at line 25 of file ErrorHandler.php.

Constructor & Destructor Documentation

◆ __construct()

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

Registers this class as default error handler

Parameters
int$errorHandlerErrorsThe integer representing the E_* error level which should be

Implements TYPO3\CMS\Core\Error\ErrorHandlerInterface.

Definition at line 39 of file ErrorHandler.php.

Member Function Documentation

◆ setExceptionalErrors()

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

Defines which error levels should result in an exception thrown.

Parameters
int$exceptionalErrorsThe integer representing the E_* error level to handle as exceptions
Returns
void

Implements TYPO3\CMS\Core\Error\ErrorHandlerInterface.

Definition at line 52 of file ErrorHandler.php.

References TYPO3\CMS\Core\Error\ErrorHandler\$exceptionalErrors, $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\devLog(), die, E_USER_ERROR, TYPO3\CMS\Core\Error\ErrorHandlerInterface\handleError(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3_MODE, and TYPO3\CMS\Core\Error\ErrorHandler\writeLog().

◆ writeLog()

TYPO3\CMS\Core\Error\ErrorHandler::writeLog (   $logMessage,
  $severity 
)
protected

Writes an error in the sys_log table

Parameters
string$logMessageDefault text that follows the message (in english!).
int$severityThe error level of the message (0 = OK, 1 = warning, 2 = error)
Returns
void

Definition at line 173 of file ErrorHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv().

Referenced by TYPO3\CMS\Core\Error\ErrorHandler\setExceptionalErrors().

Member Data Documentation

◆ $exceptionalErrors

TYPO3\CMS\Core\Error\ErrorHandler::$exceptionalErrors = array()
protected