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.
$exception->throw;
Returns the type, which should be a string such as http.
http
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-2023. Licensed under the same terms as Perl itself.
To install Ryu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ryu
CPAN shell
perl -MCPAN -e shell install Ryu
For more information on module installation, please visit the detailed CPAN module installation guide.