ErrorOutputHandler
class ErrorOutputHandler extends AbstractProcessingHandler (View source)
Output the error to either the browser or the terminal, depending on the context we're running in.
Methods
Set the mime type to use when displaying this error.
Set the HTTP status code to use when displaying this error.
Set a formatter to use if Director::is_cli() is true
Return the formatter use if Director::is_cli() is true If none has been set, null is returned, and the getFormatter() result will be used instead
Details
string
getContentType()
Get the mime type to use when displaying this error.
ErrorOutputHandler
setContentType(string $contentType)
Set the mime type to use when displaying this error.
Default text/html
int
getStatusCode()
Get the HTTP status code to use when displaying this error.
$this
setStatusCode(int $statusCode)
Set the HTTP status code to use when displaying this error.
Default 500
ErrorOutputHandler
setCLIFormatter(FormatterInterface $cliFormatter)
Set a formatter to use if Director::is_cli() is true
FormatterInterface
getCLIFormatter()
Return the formatter use if Director::is_cli() is true If none has been set, null is returned, and the getFormatter() result will be used instead
FormatterInterface
getFormatter()
Return the formatter to use in this case.
May be the getCliFormatter() value if one is provided and Director::is_cli() is true.
FormatterInterface
getDefaultFormatter()
Check default formatter to use
$this
setDefaultFormatter(FormatterInterface $formatter)
Set default formatter
protected bool
shouldShowError(int $errorCode)
No description
protected void
write(LogRecord $record)
No description