| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test2::EventFacet::Error; |
|
2
|
246
|
|
|
246
|
|
1704
|
use strict; |
|
|
246
|
|
|
|
|
530
|
|
|
|
246
|
|
|
|
|
7042
|
|
|
3
|
246
|
|
|
246
|
|
1267
|
use warnings; |
|
|
246
|
|
|
|
|
597
|
|
|
|
246
|
|
|
|
|
19341
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302182'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
36
|
|
|
36
|
1
|
136
|
sub facet_key { 'errors' } |
|
8
|
39
|
|
|
39
|
1
|
117
|
sub is_list { 1 } |
|
9
|
|
|
|
|
|
|
|
|
10
|
246
|
|
|
246
|
|
1633
|
BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } |
|
|
246
|
|
|
|
|
10373
|
|
|
11
|
246
|
|
|
246
|
|
1569
|
use Test2::Util::HashBase qw{ -tag -fail }; |
|
|
246
|
|
|
|
|
599
|
|
|
|
246
|
|
|
|
|
1841
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__END__ |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=pod |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=encoding UTF-8 |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Test2::EventFacet::Error - Facet for errors that need to be shown. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
This facet is used when an event needs to convey errors. |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NOTES |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
This facet has the hash key C<'errors'>, and is a list of facets instead of a |
|
32
|
|
|
|
|
|
|
single item. |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 FIELDS |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item $string = $error->{details} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item $string = $error->details() |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Explanation of the error, or the error itself (such as an exception). In perl |
|
43
|
|
|
|
|
|
|
exceptions may be blessed objects, so this field may contain a blessed object. |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item $short_string = $error->{tag} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item $short_string = $error->tag() |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Short tag to categorize the error. This is usually 10 characters or less, |
|
50
|
|
|
|
|
|
|
formatters may truncate longer tags. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item $bool = $error->{fail} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item $bool = $error->fail() |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Not all errors are fatal, some are displayed having already been handled. Set |
|
57
|
|
|
|
|
|
|
this to true if you want the error to cause the test to fail. Without this the |
|
58
|
|
|
|
|
|
|
error is simply a diagnostics message that has no effect on the overall |
|
59
|
|
|
|
|
|
|
pass/fail result. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SOURCE |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
|
66
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 MAINTAINERS |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over 4 |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHORS |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=over 4 |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
|
89
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
See F<http://dev.perl.org/licenses/> |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |