On 11/10/12 14:16 Bill Moseley wrote:
> 
> 
> On Thu, Oct 11, 2012 at 5:38 AM, Robert Rothenberg <rob...@gmail.com
> <mailto:rob...@gmail.com>> wrote:
> 
> 
>     I would like to trap every error added to $c->error() and log it, noting 
> the
>     caller (filename, line number) in the logs.
> 
>     I've not gotten Catalyst::Plugin::ErrorCatcher to work, so I wrote my own
>     plugin that overrides $c->error with the following method:
> 
>       use MRO::Compat;
>       use namespace::autoclean;
> 
>       sub error {
>         my ($c, @args) = @_;
> 
>         foreach my $arg (@args) {
>             if ($arg) {
> 
>                 $c->log->error($arg);
>             }
>         }
> 
> 
> Isn't that what finalize already does?

I am using a custom error page.

More importantly: I also want to know where the error was triggered, hence
my question about using Sub::Uplevel.


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to