PHP Class ApiExceptionRenderer, Platform-API-plugin

Inheritance: extends ExceptionRenderer
Show file Open project: nodesagency/Platform-API-plugin

Protected Methods

Method Description
_outputMessage ( string $template ) : void Generate the response using the controller object.
_outputMessageSafe ( string $template ) : void A safer way to render error messages, replaces all helpers, with basics and doesn't call component methods.

Method Details

_outputMessage() protected method

If there is no specific template for the error raised (normally there will not be) swallow the missing view exception and just use the standard error format. This prevents throwing a RandomException and seeing instead a MissingView exception
protected _outputMessage ( string $template ) : void
$template string The template to render.
return void

_outputMessageSafe() protected method

A safer way to render error messages, replaces all helpers, with basics and doesn't call component methods.
protected _outputMessageSafe ( string $template ) : void
$template string The template to render
return void