NAME
Catalyst::View::Errors::Text - Standard HTTP Errors Responses in Plain Text.
SYNOPSIS
package MyApp::View::Text;
use Moose;
extends 'Catalyst::View::Errors::Text';
__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.
text
Should return a string suitable for Text::Template and is used to generate a plain text error response. This is used if there's no file at $APPHOME/root/http_errors_text.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_text.tmpl
. If this this file doesn't exist we instead use the return of "text" 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
.