1Test2::Event::ExceptionU(s3e)r Contributed Perl DocumentaTteisotn2::Event::Exception(3)
2
3
4

NAME

6       Test2::Event::Exception - Exception event
7

DESCRIPTION

9       An exception event will display to STDERR, and will prevent the overall
10       test file from passing.
11

SYNOPSIS

13           use Test2::API qw/context/;
14           use Test2::Event::Exception;
15
16           my $ctx = context();
17           my $event = $ctx->send_event('Exception', error => 'Stuff is broken');
18

METHODS

20       Inherits from Test2::Event. Also defines:
21
22       $reason = $e->error
23           The reason for the exception.
24

CAVEATS

26       Be aware that all exceptions are stringified during construction.
27

SOURCE

29       The source code repository for Test2 can be found at
30       http://github.com/Test-More/test-more/.
31

MAINTAINERS

33       Chad Granum <exodist@cpan.org>
34

AUTHORS

36       Chad Granum <exodist@cpan.org>
37
39       Copyright 2020 Chad Granum <exodist@cpan.org>.
40
41       This program is free software; you can redistribute it and/or modify it
42       under the same terms as Perl itself.
43
44       See http://dev.perl.org/licenses/
45
46
47
48perl v5.34.0                      2022-03-05        Test2::Event::Exception(3)
Impressum