Valiant/Util/Exception/BadParameterFK.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 94.1% 16 / 17 CC 1 SCAR 0.0
CC
1
Cov
93%
_build_message
1.0
BEGIN
1.0
CRAP 1.0
« Valiant/Util/Exception/TooManyRows.pm ↑ Summary Valiant/Validator/locale/errors.pl »
1 package DBIx::Class::Valiant::Util::Exception::BadParameterFK;
2  
3 12 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 extends 'Valiant::Util::Exception';
5  
6 12 has [qw/fk_field fk_value pk_field pk_value related me/] => (is=>'ro', required=>1);
7  
8 3 ▶sub _build_message {
Subroutine _build_message: called CC=1 SCAR=0.0
9 3 my ($self) = @_;
10 3 return "Relationship @{[ $self->related]} on @{[ ref $self->me ]} provided parameter @{[ $self->fk_field]} with illegal value @{[ $self->fk_value]}, was expecting @{[ $self->pk_field]} to match value @{[ $self->pk_value]} ";
11 0 return $self->msg;
12 }
13  
14 12 1;
15  
16 =head1 NAME
17  
18 DBIx::Class::Valiant::Util::Exception - Bad value for a foreign key
19  
20 =head1 SYNOPSIS
21  
22 DBIx::Class::Valiant::Util::Exception->throw(msg=>'validations argument in unsupported format');
23  
24 =head1 DESCRIPTION
25  
26 A non categorized exception
27  
28 =head1 ATTRIBUTES
29  
30 =head2 msg
31  
32 Message that the exception will stringify to.
33  
34 =head2 message
35  
36 The actual exception message
37  
38 =head1 SEE ALSO
39
40 L<Valiant>
41  
42 =head1 AUTHOR
43
44 See L<Valiant>
45  
46 =head1 COPYRIGHT & LICENSE
47
48 See L<Valiant>
49  
50 =cut
« Valiant/Util/Exception/TooManyRows.pm ↑ Summary Valiant/Validator/locale/errors.pl »