TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ErrorHandler Class Reference
Inheritance diagram for ErrorHandler:
ErrorHandlerInterface

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

 $exceptionalErrors = []
 
 $debugMode = false
 

Detailed Description

Global error handler for TYPO3

This file is a backport from TYPO3 Flow

Definition at line 26 of file ErrorHandler.php.

Constructor & Destructor Documentation

__construct (   $errorHandlerErrors)

Registers this class as default error handler

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

Implements ErrorHandlerInterface.

Definition at line 47 of file ErrorHandler.php.

Member Function Documentation

getBackendUser ( )
protected
Returns

Definition at line 234 of file ErrorHandler.php.

Referenced by ErrorHandler\writeLog().

getTimeTracker ( )
protected
Returns
TimeTracker

Definition at line 226 of file ErrorHandler.php.

References GeneralUtility\makeInstance().

setDebugMode (   $debugMode)
Parameters
bool$debugMode

Definition at line 69 of file ErrorHandler.php.

References ErrorHandler\$debugMode.

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

Definition at line 61 of file ErrorHandler.php.

References ErrorHandler\$exceptionalErrors.

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

References ErrorHandler\getBackendUser(), GeneralUtility\getIndpEnv(), and GeneralUtility\makeInstance().

Member Data Documentation

$debugMode = false
protected

Definition at line 40 of file ErrorHandler.php.

Referenced by ErrorHandler\setDebugMode().

$exceptionalErrors = []
protected

Definition at line 33 of file ErrorHandler.php.

Referenced by ErrorHandler\setExceptionalErrors().