NAME

Test::Proto::Exception - indicates the test has broken, and, if possible, why

SYNOPSIS

A bit like Test::Proto::Fail, but with exceptions that return undef, not zero.

METHODS

new

Test::Proto::Exception->new('Cannot access garden');

Creats a new exception. The warning you give is the reason for the exception. Optionally, add the failure which caused this failure as a third argument (if this is boolean true, then it will return true instead).

because

$exception->because($original_sin);

Set the triggering exception/failure and return the exception. If the triggering exception/failure is boolean true, then return that instead.

Other methods

Currently all other public methods are via overloading:

All numeric operators treat Test::Proto::Exception objects as undef.

When stringified, however, Test::Proto::Exception objects return the explanation.

OTHER INFORMATION

For author, version, bug reports, support, etc, please see Test::Proto.