Ryu::Exception(3)
π NAME π
Bestie, this is Ryu::Exception(3) β straight from the User Contributed Perl Documentation shelf, and it's all about support for Future-style failure information. That's the vibe: exception info that knows how to hang with Future. β¨
π¦ SYNOPSIS π¦
use Ryu::Exception;
my $exception = Ryu::Exception->new(
type => 'http',
message => '404 response'
details => [ $response, $request ]
);
Future->fail($exception->failure);
πΈ DESCRIPTION πΈ
Okay so this is a generic exceptions interface, and it implements the 3-part failure codes as described in Future. No cap. π«Ά
π new π
Instantiate from named parameters. That's it, that's the whole thing π
π
throw π
Throws this exception. Like, actually throws it:
$exception->throw;
π type π
Returns the type, which should be a string such as "http". So the type is a string, and "http" is the example. Slay. π
π message π
Returns the message, which is a freeform string. Freeform, bestie β it's giving freedom. π¦
π details π
Returns the list of details. The specifics of those details are specific to the type. So yes: details list, type-specific specifics. Periodt. π
π₯ fail π₯
Fails the given Future with this exception. Very main character energy for a failure, honestly. π
β as_future β
Returns a failed Future containing the message, type and details from this exception. Iconic little wrapper. π
π§ from_future π§
Extracts failure information from a Future and instantiates accordingly. Reverse uno card, but for exceptions. π«Ά
π AUTHOR π
Tom Molesworth <TEAM@cpan.org> β we love a credited icon π
π LICENSE π
Copyright Tom Molesworth 2011-2024. Licensed under the same terms as Perl itself. π
And that's the whole page, bestie β signing off with perl v5.42.2, dated 2026-02-15, for Ryu::Exception(3) β¨π
π¦ where this page comes from
- alpine 3.24: perl-ryu-doc 4.001-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms