[Catalyst-dev] RFC: Catalyst::Action::RenderView::ErrorHandler
Brian Cassidy
brian.cassidy at nald.ca
Fri May 18 19:42:54 GMT 2007
John Napiorkowski wrote:
> Maybe an OT question but what's the purpose of the
> line:
>
> $Catalyst::Exception::CATALYST_EXCEPTION_CLASS =
> 'MyApp::Exception';
>
> in the sample from your blog? Seems like Catalyst
> will catch the exceptions I've been throwing with or
> without it.
Sprinkled throughout the Catalyst code are lines like
Catalyst::Exception->throw( ... );
If you look at the source to Catalyst::Exception, it does this near the top:
BEGIN {
push( @ISA, $CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base' );
}
So, what the "$Catalyst::Exception::CATALYST_EXCEPTION_CLASS = ..."
assignment does is allow those calls to actually throw my exception
class instead.
-Brian
More information about the Catalyst-dev
mailing list