1 package Catalyst::Exception;
4 use vars qw[@ISA $CATALYST_EXCEPTION_CLASS];
7 push( @ISA, $CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base' );
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.
31 =head2 throw( $message )
33 =head2 throw( message => $message )
35 =head2 throw( error => $error )
37 Throws a fatal exception.
43 my %params = @_ == 1 ? ( error => $_[0] ) : @_;
45 my $message = $params{message} || $params{error} || $! || '';
47 local $Carp::CarpLevel = 1;
49 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.