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",
36 'Koha::Exceptions::Patron::NotFound' => {
37 isa => 'Koha::Exceptions::Patron',
38 description => "Patron not found"
45 my $msg = $self->message;
48 if ( $self->isa('Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute') ) {
49 $msg = sprintf("Missing mandatory extended attribute (type=%s)", $self->type );
58 Koha::Exceptions::Patron - Base class for patron exceptions
62 =head2 Koha::Exceptions::Patron
64 Generic patron exception.
66 =head2 Koha::Exceptions::Patron::FailedDelete
68 Deleting patron failed.
70 =head2 Koha::Exceptions::Patron::FailedDeleteAnonymousPatron
72 Tried to delete the anonymous patron.
74 =head2 Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute
76 A required mandatory extended attribute is missing.
82 Overloaded method for exception stringifying.