package My::Exception;
use Moose;
use namespace::clean -except => 'meta';
-
+
with 'Catalyst::Exception::Basic';
-
+
# Elsewhere..
- My::Exception::Basic->throw( qq/Fatal exception/ );
+ My::Exception->throw( qq/Fatal exception/ );
See also L<Catalyst> and L<Catalyst::Exception>.
=head2 as_string
-Stringifies the exception's message attribute.
+Stringifies the exception's message attribute.
Called when the object is stringified by overloading.
=head2 throw( $message )