NAME

Data::Object::Exception - Exception Object for Perl 5

VERSION

version 0.55

SYNOPSIS

use Data::Object::Exception;

my $exception = Data::Object::Exception->new;

$exception->throw('Something went wrong');

DESCRIPTION

Data::Object::Exception provides a functionality for creating, throwing, catching, and introspecting generic exception objects.

METHODS

catch

$exception->catch;

The catch method returns true if the argument is the same type of object as the invocant.

data

# given $exception

$exception->data; # original value

The data method returns the original and underlying value contained by the object. This method is an alias to the detract method.

dump

$exception->dump;

The dump method returns a stringified version of the exception object.

throw

$exception->throw;

The throw method terminates the program using the core die keyword, passing the exception object as the only argument.

SEE ALSO

AUTHOR

Al Newkirk <anewkirk@ana.io>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Al Newkirk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.