‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Error\AbstractExceptionHandler Class Reference
Inheritance diagram for TYPO3\CMS\Core\Error\AbstractExceptionHandler:
TYPO3\CMS\Core\Error\ExceptionHandlerInterface TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Core\Error\DebugExceptionHandler TYPO3\CMS\Core\Error\ProductionExceptionHandler

Public Member Functions

 handleException (\Throwable $exception)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Error\ExceptionHandlerInterface
 __construct ()
 
 echoExceptionWeb (\Throwable $exception)
 
 echoExceptionCLI (\Throwable $exception)
 

Public Attributes

const CONTEXT_WEB = 'WEB'
 
const CONTEXT_CLI = 'CLI'
 
const IGNORED_HMAC_EXCEPTION_CODES
 

Protected Member Functions

 writeLogEntries (\Throwable $exception, string $mode)
 
 writeLog (string $logMessage)
 
 sendStatusHeaders (\Throwable $exception)
 
 getBackendUser ()
 
 anonymizeToken (string $requestedUrl)
 

Protected Attributes

bool $logExceptionStackTrace = false
 
const IGNORED_EXCEPTION_CODES
 

Detailed Description

An abstract exception handler

This file is a backport from TYPO3 Flow

Definition at line 36 of file AbstractExceptionHandler.php.

Member Function Documentation

◆ anonymizeToken()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::anonymizeToken ( string  $requestedUrl)
protected

Replaces the generated token with a generic equivalent

Definition at line 214 of file AbstractExceptionHandler.php.

Referenced by TYPO3\CMS\Core\Error\AbstractExceptionHandler\writeLogEntries().

◆ getBackendUser()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::getBackendUser ( )
protected

◆ handleException()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::handleException ( \Throwable  $exception)

Displays the given exception

Parameters
\Throwable$exception‪The throwable object.
Exceptions

Implements TYPO3\CMS\Core\Error\ExceptionHandlerInterface.

Definition at line 69 of file AbstractExceptionHandler.php.

References TYPO3\CMS\Core\Error\ExceptionHandlerInterface\echoExceptionCLI(), and TYPO3\CMS\Core\Error\ExceptionHandlerInterface\echoExceptionWeb().

◆ sendStatusHeaders()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::sendStatusHeaders ( \Throwable  $exception)
protected

Sends the HTTP Status 500 code, if $exception is not a TYPO3\CMS\Core\Error\Http\StatusException and headers are not sent, yet.

Parameters
\Throwable$exception‪The throwable object.

Definition at line 192 of file AbstractExceptionHandler.php.

References TYPO3\CMS\Core\Utility\HttpUtility\HTTP_STATUS_500.

Referenced by TYPO3\CMS\Core\Error\DebugExceptionHandler\echoExceptionWeb(), and TYPO3\CMS\Core\Error\ProductionExceptionHandler\echoExceptionWeb().

◆ writeLog()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::writeLog ( string  $logMessage)
protected

Writes an exception in the sys_log table

Parameters
string$logMessage‪Default text that follows the message.

Definition at line 145 of file AbstractExceptionHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Error\AbstractExceptionHandler\getBackendUser().

Referenced by TYPO3\CMS\Core\Error\AbstractExceptionHandler\writeLogEntries().

◆ writeLogEntries()

TYPO3\CMS\Core\Error\AbstractExceptionHandler::writeLogEntries ( \Throwable  $exception,
string  $mode 
)
protected

Member Data Documentation

◆ $logExceptionStackTrace

bool TYPO3\CMS\Core\Error\AbstractExceptionHandler::$logExceptionStackTrace = false
protected

Definition at line 43 of file AbstractExceptionHandler.php.

◆ CONTEXT_CLI

const TYPO3\CMS\Core\Error\AbstractExceptionHandler::CONTEXT_CLI = 'CLI'

Definition at line 41 of file AbstractExceptionHandler.php.

◆ CONTEXT_WEB

const TYPO3\CMS\Core\Error\AbstractExceptionHandler::CONTEXT_WEB = 'WEB'

Definition at line 40 of file AbstractExceptionHandler.php.

◆ IGNORED_EXCEPTION_CODES

const TYPO3\CMS\Core\Error\AbstractExceptionHandler::IGNORED_EXCEPTION_CODES
protected
Initial value:
= [
1396795884,
1616175867,
1616175847,
1436717275,
1699604555,
]

Definition at line 45 of file AbstractExceptionHandler.php.

◆ IGNORED_HMAC_EXCEPTION_CODES

const TYPO3\CMS\Core\Error\AbstractExceptionHandler::IGNORED_HMAC_EXCEPTION_CODES
Initial value:
= [
1581862822,
1581862823,
1320830018,
1320830276,
1704454157,
1704454152,
]

Definition at line 53 of file AbstractExceptionHandler.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Exception\ProductionExceptionHandler\handle().