‪TYPO3CMS  10.4
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'
 

Protected Member Functions

 writeLogEntries (\Throwable $exception, $context)
 
 writeLog ($logMessage)
 
 sendStatusHeaders (\Throwable $exception)
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
string anonymizeToken (string $requestedUrl)
 

Protected Attributes

 $logExceptionStackTrace = false
 

Private Attributes

const IGNORED_EXCEPTION_CODES
 

Detailed Description

An abstract exception handler

This file is a backport from TYPO3 Flow

Definition at line 33 of file AbstractExceptionHandler.php.

Member Function Documentation

◆ anonymizeToken()

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

Replaces the generated token with a generic equivalent

Parameters
string$requestedUrl
Returns
‪string

Definition at line 182 of file AbstractExceptionHandler.php.

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

◆ getBackendUser()

TYPO3 CMS Core Authentication BackendUserAuthentication TYPO3\CMS\Core\Error\AbstractExceptionHandler::getBackendUser ( )
protected
Returns
‪\TYPO3\CMS\Core\Authentication\BackendUserAuthentication

Definition at line 171 of file AbstractExceptionHandler.php.

References $GLOBALS.

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

◆ 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 55 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 154 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 (   $logMessage)
protected

Writes an exception in the sys_log table

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

Definition at line 107 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,
  $context 
)
protected

Member Data Documentation

◆ $logExceptionStackTrace

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

Definition at line 40 of file AbstractExceptionHandler.php.

◆ CONTEXT_CLI

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

Definition at line 38 of file AbstractExceptionHandler.php.

◆ CONTEXT_WEB

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

Definition at line 37 of file AbstractExceptionHandler.php.

◆ IGNORED_EXCEPTION_CODES

const TYPO3\CMS\Core\Error\AbstractExceptionHandler::IGNORED_EXCEPTION_CODES
private
Initial value:
= [
1396795884,
1581862822,
1581862823
]

Definition at line 42 of file AbstractExceptionHandler.php.