Overview
  • Namespace
  • Class

Namespaces

  • Slim
    • Exception
    • Handlers
      • Strategies
    • Http
    • Interfaces
      • Http

Classes

  • AbstractError
  • AbstractHandler
  • Error
  • NotAllowed
  • NotFound
  • PhpError

Class Error

Default Slim application error handler

It outputs the error message and diagnostic information in either JSON, XML, or HTML based on the Accept header.

Slim\Handlers\AbstractHandler
Extended by Slim\Handlers\AbstractError
Extended by Slim\Handlers\Error
Namespace: Slim\Handlers
Located at Handlers/Error.php

Methods summary

public Psr\Http\Message\ResponseInterface
# __invoke( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, Exception $exception )

Invoke error handler

Invoke error handler

Parameters

$request
The most recent Request object
$response
The most recent Response object
$exception
The caught Exception object

Returns

Psr\Http\Message\ResponseInterface

Throws

UnexpectedValueException
protected string
# renderHtmlErrorMessage( Exception $exception )

Render HTML error page

Render HTML error page

Parameters

$exception

Returns

string
protected string
# renderHtmlException( Exception $exception )

Render exception as HTML.

Render exception as HTML.

Provided for backwards compatibility; use renderHtmlExceptionOrError().

Parameters

$exception

Returns

string
protected string
# renderHtmlExceptionOrError( Exception|Error $exception )

Render exception or error as HTML.

Render exception or error as HTML.

Parameters

$exception

Returns

string
protected string
# renderJsonErrorMessage( Exception $exception )

Render JSON error

Render JSON error

Parameters

$exception

Returns

string
protected string
# renderXmlErrorMessage( Exception $exception )

Render XML error

Render XML error

Parameters

$exception

Returns

string

Methods inherited from Slim\Handlers\AbstractError

__construct(), logError(), renderThrowableAsText(), writeToErrorLog()

Methods inherited from Slim\Handlers\AbstractHandler

determineContentType()

Properties summary

Properties inherited from Slim\Handlers\AbstractError

$displayErrorDetails, $outputBuffering

Properties inherited from Slim\Handlers\AbstractHandler

$knownContentTypes

API documentation generated by ApiGen