TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DebugExceptionHandler Class Reference
Inheritance diagram for DebugExceptionHandler:
AbstractExceptionHandler ExceptionHandlerInterface SingletonInterface

Public Member Functions

 __construct ()
 
 echoExceptionWeb (\Throwable $exception)
 
 echoExceptionCLI (\Throwable $exception)
 
- Public Member Functions inherited from AbstractExceptionHandler
 handleException (\Throwable $exception)
 

Protected Member Functions

 getBacktraceCode (array $trace)
 
 getCodeSnippet ($filePathAndName, $lineNumber)
 
- Protected Member Functions inherited from AbstractExceptionHandler
 writeLogEntries (\Throwable $exception, $context)
 
 writeLog ($logMessage)
 
 sendStatusHeaders (\Throwable $exception)
 
 getBackendUser ()
 

Additional Inherited Members

- Public Attributes inherited from 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.

This file is a backport from TYPO3 Flow

Definition at line 24 of file DebugExceptionHandler.php.

Constructor & Destructor Documentation

__construct ( )

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

Implements ExceptionHandlerInterface.

Definition at line 29 of file DebugExceptionHandler.php.

Member Function Documentation

echoExceptionCLI ( \Throwable  $exception)

Formats and echoes the exception for the command line

Parameters
\Throwable$exceptionThe throwable object.
Returns
void

Implements ExceptionHandlerInterface.

Definition at line 118 of file DebugExceptionHandler.php.

References AbstractExceptionHandler\writeLogEntries().

echoExceptionWeb ( \Throwable  $exception)

Formats and echoes the exception as XHTML.

Parameters
\Throwable$exceptionThe throwable object.
Returns
void

Implements ExceptionHandlerInterface.

Definition at line 40 of file DebugExceptionHandler.php.

References DebugExceptionHandler\getBacktraceCode(), ClientUtility\getBrowserInfo(), GeneralUtility\getIndpEnv(), AbstractExceptionHandler\sendStatusHeaders(), and AbstractExceptionHandler\writeLogEntries().

getBacktraceCode ( array  $trace)
protected

Renders some backtrace

Parameters
array$traceThe trace
Returns
string Backtrace information

Definition at line 135 of file DebugExceptionHandler.php.

References DebugExceptionHandler\getCodeSnippet().

Referenced by DebugExceptionHandler\echoExceptionWeb().

getCodeSnippet (   $filePathAndName,
  $lineNumber 
)
protected

Returns a code snippet from the specified file.

Parameters
string$filePathAndNameAbsolute path and file name of the PHP file
int$lineNumberLine number defining the center of the code snippet
Returns
string The code snippet

Definition at line 189 of file DebugExceptionHandler.php.

Referenced by DebugExceptionHandler\getBacktraceCode().