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::FailedAnonymizing' => {
19 isa => 'Koha::Exceptions::Patron',
20 description => "Anonymizing patron reading history failed"
22 'Koha::Exceptions::Patron::FailedDeleteAnonymousPatron' => {
23 isa => 'Koha::Exceptions::Patron',
24 description => "Deleting patron failed, AnonymousPatron is not deleteable"
26 'Koha::Exceptions::Patron::InvalidUserid' => {
27 isa => 'Koha::Exceptions::Patron',
28 description => 'Field userid is not valid (probably not unique)',
29 fields => [ 'userid' ],
31 'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute' => {
32 isa => 'Koha::Exceptions::Patron',
33 description => "Mandatory extended attribute missing",
41 my $msg = $self->message;
44 if ( $self->isa('Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute') ) {
45 $msg = sprintf("Missing mandatory extended attribute (type=%s)", $self->type );
54 Koha::Exceptions::Patron - Base class for patron exceptions
58 =head2 Koha::Exceptions::Patron
60 Generic patron exception.
62 =head2 Koha::Exceptions::Patron::FailedDelete
64 Deleting patron failed.
66 =head2 Koha::Exceptions::Patron::FailedDeleteAnonymousPatron
68 Tried to delete the anonymous patron.
70 =head2 Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute
72 A required mandatory extended attribute is missing.
78 Overloaded method for exception stringifying.