1 package Koha::Exceptions::Patron;
8 'Koha::Exceptions::Patron' => {
9 isa => 'Koha::Exception',
11 'Koha::Exceptions::Patron::MissingEmailAddress' => {
12 description => "Patron has no email address",
14 'Koha::Exceptions::Patron::FailedDelete' => {
15 isa => 'Koha::Exceptions::Patron',
16 description => "Deleting patron failed"
18 'Koha::Exceptions::Patron::FailedDeleteAnonymousPatron' => {
19 isa => 'Koha::Exceptions::Patron',
20 description => "Deleting patron failed, AnonymousPatron is not deleteable"
22 'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute' => {
23 isa => 'Koha::Exceptions::Patron',
24 description => "Mandatory extended attribute missing",
32 my $msg = $self->message;
35 if ( $self->isa('Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute') ) {
36 $msg = sprintf("Missing mandatory extended attribute (type=%s)", $self->type );
45 Koha::Exceptions::Patron - Base class for patron exceptions
49 =head2 Koha::Exceptions::Patron
51 Generic patron exception.
53 =head2 Koha::Exceptions::Patron::FailedDelete
55 Deleting patron failed.
57 =head2 Koha::Exceptions::Patron::FailedDeleteAnonymousPatron
59 Tried to delete the anonymous patron.
61 =head2 Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute
63 A required mandatory extended attribute is missing.
69 Overloaded method for exception stringifying.