[Catalyst] error handling

Angel Kolev ankolev at gmail.com
Mon Dec 10 13:19:46 GMT 2007


Hi,all. Can anyone eplain me a bit about error handling. Where i can 
catch it and when? I use this:

MyApp::C::MyController

sub auto : Private {
    my ($self, $c) = @_;
    if ($c->error) {
        $c->stash->{error} = " Critical ERROR!! ";
        $c->forward('/error');
        $c->error(0);
        return 0;
    }

}

This works but then all my subs in this controller are redirected to /error.



More information about the Catalyst mailing list