1Catalyst::Plugin::CustoUmsEerrroCroMnetsrsiabguet(e3d)PCeartlalDyosctu:m:ePnltuagtiino:n:CustomErrorMessage(3)
2
3
4

NAME

6       Catalyst::Plugin::CustomErrorMessage - Catalyst plugin to have more
7       "cute" error message.
8

SYNOPSIS

10               use Catalyst qw( CustomErrorMessage );
11
12               # optional (values in this example are the defaults)
13               __PACKAGE__->config->{'custom-error-message'}->{'uri-for-not-found'} = '/';
14               __PACKAGE__->config->{'custom-error-message'}->{'error-template'}    = 'error.tt2';
15               __PACKAGE__->config->{'custom-error-message'}->{'content-type'}      = 'text/html; charset=utf-8';
16               __PACKAGE__->config->{'custom-error-message'}->{'view-name'}         = 'TT';
17               __PACKAGE__->config->{'custom-error-message'}->{'response-status'}   = 500;
18

DESCRIPTION

20       You can use this module if you want to get rid of:
21
22               (en) Please come back later
23               (fr) SVP veuillez revenir plus tard
24               (de) Bitte versuchen sie es spaeter nocheinmal
25               (at) Konnten's bitt'schoen spaeter nochmal reinschauen
26               (no) Vennligst prov igjen senere
27               (dk) Venligst prov igen senere
28               (pl) Prosze sprobowac pozniej
29
30       What it does is that it inherites finalize_error to $c object.
31
32       See finalize_error() function.
33

FUNCTIONS

35   finalize_error
36       In debug mode this function is skipped and user sees the original
37       Catalyst error page in debug mode.
38
39       In "production" (non debug) mode it will return page with template set
40       in
41
42               $c->config->{'custom-error-message'}->{'error-template'}
43               ||
44               'error.tt2'
45
46       $c->stash->{'finalize_error'} will be set to contain the error message.
47
48       For non existing resources (like misspelled url-s) if will do http
49       redirect to
50
51               $c->uri_for(
52                       $c->config->{'custom-error-message'}->{'uri-for-not-found'}
53                       ||
54                       '/'
55               )
56
57       $c->flash->{'finalize_error'} will be set to contain the error message.
58
59       To set different view name configure:
60
61               $c->config->{'custom-error-message'}->{'view-name'} = 'Mason';
62
63       Content-type and response status can be configured via:
64
65               $c->config->{'custom-error-message'}->{'content-type'}    = 'text/plain; charset=utf-8';
66               $c->config->{'custom-error-message'}->{'response-status'} = 500;
67

AUTHOR

69       Jozef Kutej - <jkutej@cpan.org>
70
72       Copyright (C) 2006 by Jozef Kutej
73
74       This library is free software; you can redistribute it and/or modify it
75       under the same terms as Perl itself, either Perl version 5.8.4 or, at
76       your option, any later version of Perl 5 you may have available.
77
78
79
80perl v5.28.1                      2010-0C9a-t0a9lyst::Plugin::CustomErrorMessage(3)
Impressum