[Catalyst] exception handling?

Caroline Johnston johnston at biochemistry.ucl.ac.uk
Tue Nov 15 14:49:29 CET 2005


Thanks for getting back to me. I was really looking for a guide to how the
error processing works rather than an example of how to use it. I'm
probably just being gormless, but I can't seem to get the example to work.

Clearing the error in MyApp::end doesn't seem to make any difference. In
fact, doing anything in end doesn't seem to make a difference if I've set
an error.

If in end I have:

    if ( 1 ) {
            $c->stash->{errors}   = $c->error;
            $c->stash->{template} = 'errors';
            $c->forward('WebR::View::TT');
            $c->{error} = [];
        }

The when I go to a page that doesn't set an error I get the 'errors'
template as I would expect. If I then change the controller of that page
to set an error like $c->error('some message') then instead of my own
errors page, I get the default error page with (with -Default) the message
'some message'

Any ideas what I'm missing?

Cxx




On Tue, 15 Nov 2005, Will Hawes wrote:

> Caroline Johnston wrote:
> > hello.
> >
> > New to catalyst and liking it lots, but I'm not getting the hang of
> > exception handling from the docs. Is there a guide somewhere?
> >
> > thanks,
> >
> > Cxx
> >
> >
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> >
>
> If I understand correctly, maybe this will be of use:
>
> http://search.cpan.org/~mramberg/Catalyst-5.52/lib/Catalyst/Manual/Cookbook.pod#Delivering_a_Custom_Error_Page
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>







More information about the Catalyst mailing list