On Thu, Oct 11, 2012 at 1:38 PM, Robert Rothenberg <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

I don't think Catalyst::Plugin::ErrorCatcher is quite what you need for
your requirement.

ErrorCatcher is basically ::Plugin::StackTrace with more options for where
the stack-trace should go (and some support for you to create more

It prepares (ok, munges in weird and wonderful ways) the output you would
see in the stacktrace plugin, and passes it on to pluggable modules for
them to 'emit' the prepared messages as they see fit.

It doesn't interact with $c->error() directly as far as I can remember.

e: chi...@chizography.net
w: http://chizography.net
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