| 1 | package DBIx::Class::Valiant::Util::Exception::TooManyRows; | ||
| 2 | |||
| 3 | 12 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 12 | extends 'Valiant::Util::Exception'; | |
| 5 | |||
| 6 | 12 | has [qw/limit attempted related me/] => (is=>'ro', required=>1); | |
| 7 | |||
| 8 | 1 | ▶ | sub _build_message { |
|
Subroutine
_build_message: called CC=1 SCAR=0.0
| |||
| 9 | 1 | my ($self) = @_; | |
| 10 | 1 | return "Relationship @{[ $self->related]} on @{[ $self->me]} can't create more that @{[ $self->limit]} rows; attempted @{[ $self->attempted]}"; | |
| 11 | 0 | return $self->msg; | |
| 12 | } | ||
| 13 | |||
| 14 | 12 | 1; | |
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | DBIx::Class::Valiant::Util::Exception - More rows attempted than you are permitted to create | ||
| 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 | ||