1 package Catalyst::Exception;
4 push( @ISA, $CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base' );
8 use vars qw[@ISA $CATALYST_EXCEPTION_CLASS];
10 package Catalyst::Exception::Base;
17 Catalyst::Exception - Catalyst Exception Class
21 Catalyst::Exception->throw( qq/Fatal exception/ );
27 This is the Catalyst Exception class.
35 Throws a fatal exception.
41 my %params = @_ == 1 ? ( error => $_[0] ) : @_;
43 my $message = $params{message} || $params{error} || $! || '';
45 local $Carp::CarpLevel = 1;
47 Carp::croak($message);
54 Sebastian Riedel, C<sri@cpan.org>
55 Christian Hansen, C<ch@ngmedia.com>
59 This program is free software, you can redistribute it and/or modify
60 it under the same terms as Perl itself.