final class ErrorPageRenderer (View source)

Renders configured HTML error views with safe fallbacks and development-only diagnostics.

Methods

Connects environment context, resolved templates, and lazy view resolution.

string
notFound(Throwable $exception)

Renders a not-found page without exposing exception details outside development.

string
string

Renders a server-error page and appends diagnostics only in development.

string

Details

__construct

__construct(ApplicationContext $context, ErrorConfig $config, ContainerInterface $container)

Connects environment context, resolved templates, and lazy view resolution.

Parameters

ApplicationContext $context
ErrorConfig $config
ContainerInterface $container

notFound

string notFound(Throwable $exception)

Renders a not-found page without exposing exception details outside development.

Parameters

Throwable $exception

Return Value

string

internalServerError

string internalServerError(Throwable $exception)

Renders a server-error page and appends diagnostics only in development.

Parameters

Throwable $exception

Return Value

string