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::FailedDeleteProtectedPatron' => {
27 isa => 'Koha::Exceptions::Patron',
28 description => "Deleting patron failed, patron is protected"
30 'Koha::Exceptions::Patron::InvalidUserid' => {
31 isa => 'Koha::Exceptions::Patron',
32 description => 'Field userid is not valid (probably not unique)',
33 fields => [ 'userid' ],
35 'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute' => {
36 isa => 'Koha::Exceptions::Patron',
37 description => "Mandatory extended attribute missing",
40 'Koha::Exceptions::Patron::NotFound' => {
41 isa => 'Koha::Exceptions::Patron',
42 description => "Patron not found"
49 my $msg = $self->message;
52 if ( $self->isa('Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute') ) {
53 $msg = sprintf("Missing mandatory extended attribute (type=%s)", $self->type );
62 Koha::Exceptions::Patron - Base class for patron exceptions
66 =head2 Koha::Exceptions::Patron
68 Generic patron exception.
70 =head2 Koha::Exceptions::Patron::FailedDelete
72 Deleting patron failed.
74 =head2 Koha::Exceptions::Patron::FailedDeleteAnonymousPatron
76 Tried to delete the anonymous patron.
78 =head2 Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute
80 A required mandatory extended attribute is missing.
86 Overloaded method for exception stringifying.