Cassandane::JMAPAbort

NAME

Cassandane::JMAPAbort - a JMAP::Tester abort that counts as a failing test

DESCRIPTION

When JMAP::Tester gives up, it throws a JMAP::Tester::Abort, which is a Throwable::Error. The test framework needs failures to be a Cassandane::Failure. (Otherwise they get treated as errors, which they aren't.)

This stupid class saves us from multiple inheritance, and Cassandane::Role::JMAPTester makes our JMAP::Tester classes use it.

METHODS

new

Cassandane::JMAPAbort->new($message);
Cassandane::JMAPAbort->new({ message => $message, diagnostics => \@diags });

Those are the two ways JMAP::Tester builds an abort. The diagnostics have already been formatted by the tester's diagnostic dumper, and get folded into the message, because the message is what a report shows.

Called any other way, we assume we've been given the usual Error.pm arguments, so that an abort can be rethrown like any other exception.