TEST2::EVENT::EXCEPTION(3pm)
π NAME π
Test2::Event::Exception β Exception event π
Okay so this page is Test2::...xception(3pm) from the Perl Programmers Reference Guide β aka the docs for the Exception event, bestie.
πΈ DESCRIPTION πΈ
An exception event will display to STDERR, and it will prevent the overall test file from passing. That's the whole vibe: exception event = not passing, periodt. π
β¨ SYNOPSIS β¨
Tiny code moment, no cap:
use Test2::API qw/context/;
use Test2::Event::Exception;
my $ctx = context();
my $event = $ctx->send_event('Exception', error => 'Stuff is broken');
π METHODS π
Inherits from Test2::Event. Also defines:
$reason = $e->errorβ the reason for the exception. That's it, that's the method, and it's iconic. π
π¦ CAVEATS π¦
Heads up, bestie: be aware that all exceptions are stringified during construction. Not me warning you for no reason β that's the caveat, fr fr. β οΈ
π SOURCE π
The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>. Go browse, it's giving open source excellence. π
π MAINTAINERS π
Chad Granum <exodist@cpan.org> β maintaining the vibes. π«Ά
π AUTHORS π
Chad Granum <exodist@cpan.org> β authoring the vibes. β¨
πΈ COPYRIGHT πΈ
Legal bits, bestie β keep them intact:
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <https://dev.perl.org/licenses/>
Bye bestie π«Ά this page is from perl v5.42.3, dated 2026-11-03, and the footer calls it Test2::...xception(3pm). Mwah πβ¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms