NAME

Plasp::Exception - Basic Plasp Exception Role

SYNOPSIS

package My::Exception;
use Moo;

with 'Plasp::Exception';

# Elsewhere..
My::Exception->throw( qq/Fatal exception/ );

DESCRIPTION

This is the basic Plasp Exception role which is basically a rip off of Catalyst::Exception::Basic.

ATTRIBUTES

message

Holds the exception message.

METHODS

as_string

Stringifies the exception's message attribute. Called when the object is stringified by overloading.

throw( $message )

throw( message => $message )

throw( error => $error )

Throws a fatal exception.

rethrow( $exception )

Rethrows a caught exception.

SEE ALSO