TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Error\ErrorHandler Class Reference
Inheritance diagram for TYPO3\CMS\Core\Error\ErrorHandler:
TYPO3\CMS\Core\Error\ErrorHandlerInterface

Public Member Functions

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

Protected Member Functions

 writeLog ($logMessage, $severity)
 
 getTimeTracker ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $exceptionalErrors = []
 
 $debugMode = false
 

Detailed Description

Global error handler for TYPO3

This file is a backport from TYPO3 Flow

Definition at line 24 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 45 of file ErrorHandler.php.

Member Function Documentation

◆ getBackendUser()

TYPO3\CMS\Core\Error\ErrorHandler::getBackendUser ( )
protected
Returns

Definition at line 228 of file ErrorHandler.php.

References $GLOBALS.

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

◆ getDatabaseConnection()

TYPO3\CMS\Core\Error\ErrorHandler::getDatabaseConnection ( )
protected
Returns

Definition at line 236 of file ErrorHandler.php.

References $GLOBALS.

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

◆ getTimeTracker()

TYPO3\CMS\Core\Error\ErrorHandler::getTimeTracker ( )
protected
Returns

Definition at line 220 of file ErrorHandler.php.

References $GLOBALS.

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

◆ setDebugMode()

◆ 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 59 of file ErrorHandler.php.

References TYPO3\CMS\Core\Error\ErrorHandler\$exceptionalErrors.

◆ 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 182 of file ErrorHandler.php.

References $GLOBALS, TYPO3\CMS\Core\Error\ErrorHandler\getBackendUser(), TYPO3\CMS\Core\Error\ErrorHandler\getDatabaseConnection(), and TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv().

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

Member Data Documentation

◆ $debugMode

TYPO3\CMS\Core\Error\ErrorHandler::$debugMode = false
protected

Definition at line 38 of file ErrorHandler.php.

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

◆ $exceptionalErrors

TYPO3\CMS\Core\Error\ErrorHandler::$exceptionalErrors = []
protected