Ryu::Exception - support for Future-style failure information
use Ryu::Exception; my $exception = Ryu::Exception->new( type => 'http', message => '404 response' details => [ $response, $request ] ); Future->fail($exception->failure);
Generic exceptions interface, implements the 3-part failure codes as described in Future.
Instantiate from named parameters.
Throws this exception.
Returns the type, which should be a string such as
Returns the message, which is a freeform string.
Returns the list of details, the specifics of which are specific to the type.
Fails the given Future with this exception.
Returns a failed Future containing the message, type and details from this exception.
Extracts failure information from a Future and instantiates accordingly.
Tom Molesworth <TEAM@cpan.org>
Copyright Tom Molesworth 2011-2020. Licensed under the same terms as Perl itself.