The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::View::Errors::HTML - Standard HTTP Errors Responses in HTML

SYNOPSIS

    package MyApp::View::HTML;

    use Moose;
    extends 'Catalyst::View::Errors::HTML';

    __PACKAGE__->meta->make_immutable;

DESCRIPTION

View class for generating error responses. If you want a lot of customizations you can subclass this in your application, or just use your own view.

METHODS

This view exposes the follow methods for public use or for a programmer to override to change function.

html

Should return a string suitable for Text::Template and is used to generate an HTML error response. This is used if there's no file at $APPHOME/root/http_errors_html.tmpl

available_languages

An array of the languages available for serving error responses. By default we use CatalystX::Utils::ErrorMessages but if you have your own list of translations you can override this.

get_message_info

Return error message info by code and language. By default we use CatalystX::Utils::ErrorMessages but if you have your own list of translations you can override this.

finalize_message_info

Finalizes the hash of data that is sent to the template handler to make the body of the error response. You can override if you want to change or add to this data.

CONFIGURATION

This View exposes the following configuration options

template_engine_args

Args that are used to start the Text::Template template engin

template_name

Name of the files under $APPHOME/root that is used to render an error view. Default is http_errors_html.tmpl. If this this file doesn't exist we instead use the return of "html" method for the template string.

default_language

When doing content negotiation if there's no language preferred by the client use this language. Default is en_US.

SEE ALSO

CatalystX::Errors.

AUTHOR

CatalystX::Errors.

COPYRIGHT & LICENSE

CatalystX::Errors.