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

Public Member Functions

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

Protected Member Functions

string getContent (\Throwable $throwable)
 
string getSingleThrowableContent (\Throwable $throwable, int $index, int $total)
 
string getStylesheet ()
 
string getBacktraceCode (array $trace)
 
string getCodeSnippet (string $filePathAndName, int $lineNumber)
 
string formatPath (string $path, int $line)
 
string formatArgs (array $args)
 
 flattenArgs (array $args, int $level=0, int &$count=0)
 
 getClassNameFromIncomplete (\__PHP_Incomplete_Class $value)
 
 escapeHtml (string $str)
 
 getTypo3LogoAsSvg ()
 
 getAllThrowables (\Throwable $throwable)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Error\AbstractExceptionHandler
 writeLogEntries (\Throwable $exception, $context)
 
 writeLog ($logMessage)
 
 sendStatusHeaders (\Throwable $exception)
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
string anonymizeToken (string $requestedUrl)
 

Protected Attributes

 $logExceptionStackTrace = true
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Error\AbstractExceptionHandler
 $logExceptionStackTrace = false
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Error\AbstractExceptionHandler
const CONTEXT_WEB = 'WEB'
 
const CONTEXT_CLI = 'CLI'
 

Detailed Description

A basic but solid exception handler which catches everything which falls through the other exception handlers and provides useful debugging information.

Definition at line 27 of file DebugExceptionHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Error\DebugExceptionHandler::__construct ( )

Constructs this exception handler - registers itself as the default exception handler.

Implements TYPO3\CMS\Core\Error\ExceptionHandlerInterface.

Definition at line 34 of file DebugExceptionHandler.php.

Member Function Documentation

◆ echoExceptionCLI()

TYPO3\CMS\Core\Error\DebugExceptionHandler::echoExceptionCLI ( \Throwable  $exception)

Formats and echoes the exception for the command line

Parameters
\Throwable$exception‪The throwable object.

Implements TYPO3\CMS\Core\Error\ExceptionHandlerInterface.

Definition at line 73 of file DebugExceptionHandler.php.

References TYPO3\CMS\Core\Error\AbstractExceptionHandler\writeLogEntries().

◆ echoExceptionWeb()

◆ escapeHtml()

◆ flattenArgs()

TYPO3\CMS\Core\Error\DebugExceptionHandler::flattenArgs ( array  $args,
int  $level = 0,
int &  $count = 0 
)
protected

◆ formatArgs()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::formatArgs ( array  $args)
protected

Formats the arguments of a method call.

Parameters
array$args‪The flattened args of method/function call
Returns
‪string

Definition at line 504 of file DebugExceptionHandler.php.

References $args, and TYPO3\CMS\Core\Error\DebugExceptionHandler\escapeHtml().

Referenced by TYPO3\CMS\Core\Error\DebugExceptionHandler\getBacktraceCode().

◆ formatPath()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::formatPath ( string  $path,
int  $line 
)
protected

Formats a path adding a line number.

Parameters
string$path‪The full path of the file.
int$line‪The line number.
Returns
‪string

Definition at line 489 of file DebugExceptionHandler.php.

References TYPO3\CMS\Core\Error\DebugExceptionHandler\escapeHtml().

Referenced by TYPO3\CMS\Core\Error\DebugExceptionHandler\getCodeSnippet().

◆ getAllThrowables()

TYPO3\CMS\Core\Error\DebugExceptionHandler::getAllThrowables ( \Throwable  $throwable)
protected

◆ getBacktraceCode()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::getBacktraceCode ( array  $trace)
protected

◆ getClassNameFromIncomplete()

TYPO3\CMS\Core\Error\DebugExceptionHandler::getClassNameFromIncomplete ( \__PHP_Incomplete_Class  $value)
protected

◆ getCodeSnippet()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::getCodeSnippet ( string  $filePathAndName,
int  $lineNumber 
)
protected

Returns a code snippet from the specified file.

Parameters
string$filePathAndName‪Absolute path and file name of the PHP file
int$lineNumber‪Line number defining the center of the code snippet
Returns
‪string The code snippet

Definition at line 444 of file DebugExceptionHandler.php.

References TYPO3\CMS\Core\Error\DebugExceptionHandler\escapeHtml(), and TYPO3\CMS\Core\Error\DebugExceptionHandler\formatPath().

Referenced by TYPO3\CMS\Core\Error\DebugExceptionHandler\getBacktraceCode().

◆ getContent()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::getContent ( \Throwable  $throwable)
protected

◆ getSingleThrowableContent()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::getSingleThrowableContent ( \Throwable  $throwable,
int  $index,
int  $total 
)
protected

Renders the HTML for a single throwable.

Parameters
\Throwable$throwable
int$index
int$total
Returns
‪string

Definition at line 155 of file DebugExceptionHandler.php.

References TYPO3\CMS\Core\Error\DebugExceptionHandler\escapeHtml(), and TYPO3\CMS\Core\Error\DebugExceptionHandler\getBacktraceCode().

Referenced by TYPO3\CMS\Core\Error\DebugExceptionHandler\getContent().

◆ getStylesheet()

string TYPO3\CMS\Core\Error\DebugExceptionHandler::getStylesheet ( )
protected

Generates the stylesheet needed to display the error page.

Returns
‪string

Definition at line 193 of file DebugExceptionHandler.php.

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

◆ getTypo3LogoAsSvg()

TYPO3\CMS\Core\Error\DebugExceptionHandler::getTypo3LogoAsSvg ( )
protected

Member Data Documentation

◆ $logExceptionStackTrace

TYPO3\CMS\Core\Error\DebugExceptionHandler::$logExceptionStackTrace = true
protected

Definition at line 29 of file DebugExceptionHandler.php.