« Valiant/Util/Exception/InvalidValidatorArgs.pm
↑ Summary
Valiant/Util/Exception/NameNotFilter.pm »
| 1 | package Valiant::Util::Exception::MissingCountKey; | ||
| 2 | |||
| 3 | use Moo; | ||
| 4 | extends 'Valiant::Util::Exception'; | ||
| 5 | |||
| 6 | has tag => (is=>'ro', required=>1); | ||
| 7 | has count => (is=>'ro', required=>1); | ||
| 8 | |||
| 9 | sub _build_message { | ||
| 10 | my ($self) = @_; | ||
| 11 | return "Translation tag '@{[ $self->tag ]}' has no count subkey matching '@{[ $self->count ]}'."; | ||
| 12 | } | ||
| 13 | |||
| 14 | 1; | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | Valiant::Util::Exception::MissingCountKey - Not count subkey for the translation tag | ||
| 19 | |||
| 20 | =head1 SYNOPSIS | ||
| 21 | |||
| 22 | throw_exception('MissingCountKey', tag=>$original, count=>$count); | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | Your translation tag defines count subkeys but there's nothing matching the current count | ||
| 27 | |||
| 28 | =head1 ATTRIBUTES | ||
| 29 | |||
| 30 | =head2 tag | ||
| 31 | |||
| 32 | =head2 count | ||
| 33 | |||
| 34 | The original tag whose count we cannot translate. This usually means you are missing a count | ||
| 35 | key. | ||
| 36 | |||
| 37 | =head2 message | ||
| 38 | |||
| 39 | The actual exception message | ||
| 40 | |||
| 41 | =head1 SEE ALSO | ||
| 42 | |||
| 43 | L<Valiant> | ||
| 44 | |||
| 45 | =head1 AUTHOR | ||
| 46 | |||
| 47 | See L<Valiant> | ||
| 48 | |||
| 49 | =head1 COPYRIGHT & LICENSE | ||
| 50 | |||
| 51 | See L<Valiant> | ||
| 52 | |||
| 53 | =cut |