Cataly...:Basic(3pm)

πŸ“¦
version 5.90132 Β· 6 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Cataly...:Basic πŸ’–

okay bestie, pull up a chair because we're talking about Cataly...:Basic β€” the User Contributed Perl Documentation edition, no cap. This is the Perl manual page for the basic Catalyst Exception role, and honestly? It's giving foundational. πŸŽ€


✨ NAME ✨

Catalyst::Exception::Basic β€” the Basic Catalyst Exception Role, fr fr. It's the little role that could. πŸ¦‹


🌸 SYNOPSIS 🌸

so here's the whole vibe in code, bestie:

package My::Exception;
use Moose;
use namespace::clean -except => 'meta';

with 'Catalyst::Exception::Basic';

# Elsewhere..
My::Exception->throw( qq/Fatal exception/ );

and then, # Elsewhere.. you just throw it like the main character you are. πŸ’…

See also Catalyst and Catalyst::Exception β€” iykyk, go read those too. 🫢


πŸ’œ DESCRIPTION πŸ’œ

okay so real talk: this is the basic Catalyst Exception role which implements, like, all of Catalyst::Exception::Interface. every single bit. she ate and left no crumbs. πŸ‘‘


πŸŽ€ ATTRIBUTES πŸŽ€

πŸ“ message

Holds the exception message. that's it, that's the whole attribute. she holds the message. iconic behaviour. ✨


πŸ¦‹ METHODS πŸ¦‹

🌈 as_string

Stringifies the exception's message attribute. basically whenever the object gets stringified by overloading, this is the girl doing the work. not me being obsessed with a stringification method but here we are. 😭

πŸ”₯ throw( $message )

πŸ”₯ throw( message => $message )

πŸ”₯ throw( error => $error )

Throws a fatal exception. yes it's literally called throw and yes it does exactly what it says. three whole ways to call it, pick your fighter. πŸ’€

πŸ’… rethrow( $exception )

Rethrows a caught exception. caught it, looked at it, threw it right back. no notes. 🧚

⭐ meta

Provided by Moose. we don't ask questions, we just say thank you Moose. πŸ™ˆ


πŸ‘‘ AUTHORS πŸ‘‘

Catalyst Contributors, see Catalyst.pm. the whole squad, the whole group chat. πŸ’–


This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. slay, legally speaking. βš–οΈβœ¨


and that's the whole page bestie, no cap, every single detail intact πŸ’―

okay so the cute lil sign-off: this page is from the User Contributed Perl Documentation, generated with perl v5.40.0 on 2024-11-15. thanks for reading, mwah πŸ’‹ πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from