PHP Class Neos\Flow\Error\AbstractExceptionHandler

Inheritance: implements Neos\Flow\Error\ExceptionHandlerInterface
Afficher le fichier Open project: neos/flow-development-collection

Protected Properties

Свойство Type Description
$options array
$renderingOptions array
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Méthodes publiques

Méthode Description
__construct ( ) Constructs this exception handler - registers itself as the default exception handler.
handleException ( object $exception ) : void Handles the given exception
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void Injects the system logger
setOptions ( array $options ) : void Sets options of this exception handler.

Méthodes protégées

Méthode Description
applyLegacyViewOptions ( Neos\Flow\Mvc\View\ViewInterface $view, array $renderingOptions ) : Neos\Flow\Mvc\View\ViewInterface Sets legacy "option" properties to the view for backwards compatibility.
buildView ( object $exception, array $renderingOptions ) : Neos\Flow\Mvc\View\ViewInterface Prepares a Fluid view for rendering the custom error page.
echoExceptionCli ( object $exception ) : void Formats and echoes the exception and its previous exceptions (if any) for the command line
echoExceptionWeb ( object $exception ) : void Echoes an exception for the web.
renderExceptionDetailCli ( string $label, string $value ) : string Renders the given $value word-wrapped and prefixed with $label
renderSingleExceptionCli ( object $exception ) : string Renders a single exception including message, code and affected file
resolveCustomRenderingOptions ( object $exception ) : array Checks if custom rendering rules apply to the given $exception and returns those.
resolveRenderingGroup ( object $exception ) : string
splitExceptionMessage ( string $exceptionMessage ) : array Splits the given string into subject and body according to following rules: - If the string is empty or does not contain more than one sentence nor line breaks, the subject will be equal to the string and body will be an empty string - Otherwise the subject is everything until the first line break or end of sentence, the body contains the rest

Method Details

__construct() public méthode

Constructs this exception handler - registers itself as the default exception handler.
public __construct ( )

applyLegacyViewOptions() protected méthode

Sets legacy "option" properties to the view for backwards compatibility.
protected applyLegacyViewOptions ( Neos\Flow\Mvc\View\ViewInterface $view, array $renderingOptions ) : Neos\Flow\Mvc\View\ViewInterface
$view Neos\Flow\Mvc\View\ViewInterface
$renderingOptions array
Résultat Neos\Flow\Mvc\View\ViewInterface

buildView() protected méthode

Prepares a Fluid view for rendering the custom error page.
protected buildView ( object $exception, array $renderingOptions ) : Neos\Flow\Mvc\View\ViewInterface
$exception object \Exception or \Throwable
$renderingOptions array Rendering options as defined in the settings
Résultat Neos\Flow\Mvc\View\ViewInterface

echoExceptionCli() protected méthode

Formats and echoes the exception and its previous exceptions (if any) for the command line
protected echoExceptionCli ( object $exception ) : void
$exception object \Exception or \Throwable
Résultat void

echoExceptionWeb() abstract protected méthode

Echoes an exception for the web.
abstract protected echoExceptionWeb ( object $exception ) : void
$exception object \Exception or \Throwable
Résultat void

handleException() public méthode

Handles the given exception
public handleException ( object $exception ) : void
$exception object The exception object - can be \Exception, or some type of \Throwable in PHP 7
Résultat void

injectSystemLogger() public méthode

Injects the system logger
public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
Résultat void

renderExceptionDetailCli() protected méthode

Renders the given $value word-wrapped and prefixed with $label
protected renderExceptionDetailCli ( string $label, string $value ) : string
$label string
$value string
Résultat string

renderSingleExceptionCli() protected méthode

Renders a single exception including message, code and affected file
protected renderSingleExceptionCli ( object $exception ) : string
$exception object \Exception or \Throwable
Résultat string

resolveCustomRenderingOptions() protected méthode

Checks if custom rendering rules apply to the given $exception and returns those.
protected resolveCustomRenderingOptions ( object $exception ) : array
$exception object \Exception or \Throwable
Résultat array the custom rendering options, or NULL if no custom rendering is defined for this exception

resolveRenderingGroup() protected méthode

protected resolveRenderingGroup ( object $exception ) : string
$exception object \Exception or \Throwable
Résultat string name of the resolved renderingGroup or NULL if no group could be resolved

setOptions() public méthode

Sets options of this exception handler.
public setOptions ( array $options ) : void
$options array Options for the exception handler
Résultat void

splitExceptionMessage() protected méthode

Splits the given string into subject and body according to following rules: - If the string is empty or does not contain more than one sentence nor line breaks, the subject will be equal to the string and body will be an empty string - Otherwise the subject is everything until the first line break or end of sentence, the body contains the rest
protected splitExceptionMessage ( string $exceptionMessage ) : array
$exceptionMessage string
Résultat array in the format array('subject' => '', 'body' => '');

Property Details

$options protected_oe property

protected array $options
Résultat array

$renderingOptions protected_oe property

protected array $renderingOptions
Résultat array

$systemLogger protected_oe property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Résultat Neos\Flow\Log\SystemLoggerInterface