Net::A...ler::X(3pm)
π Net::Amazon::S3::Error::Handler::X π
okay so bestie, welcome to the manual page for Net::Amazon::S3::Error::Handler::X β that's a Perl module, section 3pm, straight out of the User Contributed Perl Documentation collection. she's a little error handler and she's so dramatic about it (affectionate). β¨
πΈ NAME πΈ
Net::Amazon::S3::Error::Handler::X β Throw error specific exception
like. that's the whole job. she throws exceptions that are specific to the error. no generic sad little string exceptions here, we're doing β¨themedβ¨ exceptions. π
β VERSION β
version 0.992 π
π¦ DESCRIPTION π¦
Raise error specific exception. π«Ά
that's it. that's the description. she raises an exception that matches the error. iconic behaviour honestly.
π S3 error π
okay so for S3 errors, the exception she raises is an instance of:
Net::Amazon::S3::X::error-code
so like, the class name literally contains the AWS error code. no cap. π
AWS error code list can be found at: <https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList>
(not me dropping a whole URL, iykyk β go read the list, it's giving thorough.)
and here's how you actually wire her up, fr fr:
my $s3 = Net::Amazon::S3->new (
error_handler_class => 'Net::Amazon::S3::Error::Handler::X',
...
);
eval { do s3 operation; 1 } or do {
say 'access denied'
if $@->$Safe::Isa::_isa ('Net::Amazon::S3::X::AccessDenied');
...
};
see what's happening there? you pass error_handler_class => 'Net::Amazon::S3::Error::Handler::X' to Net::Amazon::S3->new, and then in your eval you catch the thing with $@ and check $@->$Safe::Isa::_isa ('Net::Amazon::S3::X::AccessDenied') β because the exception is an instance of Net::Amazon::S3::X::AccessDenied (that's the error-code slot doing its job π
). queen behaviour.
π AUTHOR π
Branislav ZahradnΓk <barney@cpan.org> π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2025 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav ZahradnΓk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
π reminder bestie: don't skip the license bit, we respect the copyright holders in this house. all six of them. periodt.
and that's the whole page!! π this one was rendered with perl v5.40.1, dated 2025-12-07, from Net::A...ler::X(3pm), and yes the header said User Contributed Perl Documentation β go forth and throw β¨specificβ¨ exceptions, bestie π¦πβ¨
π¦ where this page comes from
- ubuntu resolute: libnet-amazon-s3-perl 0.992-1 Β· other
- ubuntu stonking: libnet-amazon-s3-perl 0.992-1 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms