lib/File/DataClass/Exception.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/File/DataClass/List.pm ↑ Summary
1 package File::DataClass::Exception;
2  
3 8 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 8 ▶use Unexpected::Functions qw( has_exception );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use Unexpected::Types qw( Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 8 extends q(Unexpected);
10 8 with q(Unexpected::TraitFor::ErrorLeader);
11 8 with q(Unexpected::TraitFor::ExceptionClasses);
12  
13 8 my $class = __PACKAGE__; $class->ignore_class( 'File::DataClass::IO' );
14  
15 8 has_exception $class;
16  
17 8 has_exception 'NothingUpdated' => parents => [ $class ],
18 error => 'Nothing updated';
19  
20 8 has_exception 'PathAlreadyExists' => parents => [ $class ],
21 error => 'Path [_1] already exists';
22  
23 8 has_exception 'PathNotFound' => parents => [ $class ],
24 error => 'Path [_1] not found';
25  
26 8 has_exception 'InvocantUndefined' => parents => [ $class ],
27 error => 'Method [_1] cannot call with undefined invocant';
28  
29 8 has_exception 'RecordAlreadyExists' => parents => [ $class ],
30 error => 'File [_1] record [_2] already exists';
31  
32 8 has_exception 'RecordNotFound' => parents => [ $class ],
33 error => 'File [_1] record [_2] does not exist';
34  
35 8 has '+class' => default => $class;
36  
37 8 has 'out' => is => 'ro', isa => Str, default => q();
38  
39 8 1;
40  
41 __END__
« lib/File/DataClass/List.pm ↑ Summary