1 package Catalyst::Exception;
4 use vars qw[@ISA $CATALYST_EXCEPTION_CLASS];
5 use UNIVERSAL::require;
8 push( @ISA, $CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base' );
11 package Catalyst::Exception::Base;
18 Catalyst::Exception - Catalyst Exception Class
22 Catalyst::Exception->throw( qq/Fatal exception/ );
28 This is the Catalyst Exception class.
32 =head2 throw( $message )
34 =head2 throw( message => $message )
36 =head2 throw( error => $error )
38 Throws a fatal exception.
44 my %params = @_ == 1 ? ( error => $_[0] ) : @_;
46 my $message = $params{message} || $params{error} || $! || '';
48 local $Carp::CarpLevel = 1;
50 Carp::croak($message);
55 Sebastian Riedel, C<sri@cpan.org>
56 Christian Hansen, C<ch@ngmedia.com>
60 This program is free software, you can redistribute it and/or modify
61 it under the same terms as Perl itself.