TYPO3 CMS  TYPO3_6-2
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 t3lib_error_DebugExceptionHandler

Public Member Functions

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

Protected Member Functions

 getBacktraceCode (array $trace)
 
 getCodeSnippet ($filePathAndName, $lineNumber)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Error\AbstractExceptionHandler
 writeLogEntries (\Exception $exception, $context)
 
 writeLog ($logMessage)
 
 sendStatusHeaders (\Exception $exception)
 
 getDatabaseConnection ()
 

Additional Inherited Members

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! 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 FLOW3

Author
Ingo Renner ingo@.nosp@m.typo.nosp@m.3.org

Definition at line 25 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.

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Implements TYPO3\CMS\Core\Error\ExceptionHandlerInterface.

Definition at line 32 of file DebugExceptionHandler.php.

Member Function Documentation

◆ echoExceptionCLI()

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

Formats and echoes the exception for the command line

Parameters
\Exception$exceptionThe exception object
Returns
void
Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Implements TYPO3\CMS\Core\Error\ExceptionHandlerInterface.

Definition at line 121 of file DebugExceptionHandler.php.

References die, and TYPO3\CMS\Core\Error\AbstractExceptionHandler\writeLogEntries().

◆ echoExceptionWeb()

◆ getBacktraceCode()

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

Renders some backtrace

Parameters
array$traceThe trace
Returns
string Backtrace information
Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Definition at line 141 of file DebugExceptionHandler.php.

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

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

◆ getCodeSnippet()

TYPO3\CMS\Core\Error\DebugExceptionHandler::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
Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Definition at line 195 of file DebugExceptionHandler.php.

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