Bug 19059: Remove CancelReserve - do not log DELETE
[koha.git] / Koha / Exceptions.pm
1 package Koha::Exceptions;
2
3 use Modern::Perl;
4
5 use Exception::Class (
6
7     # General exceptions
8     'Koha::Exceptions::Exception' => {
9         description => 'Something went wrong!',
10     },
11     'Koha::Exceptions::DuplicateObject' => {
12         isa => 'Koha::Exceptions::Exception',
13         description => 'Same object already exists',
14     },
15     'Koha::Exceptions::ObjectNotFound' => {
16         isa => 'Koha::Exceptions::Exception',
17         description => 'The required object doesn\'t exist',
18     },
19     'Koha::Exceptions::CannotDeleteDefault' => {
20         isa => 'Koha::Exceptions::Exception',
21         description => 'The default value cannot be deleted'
22     },
23     'Koha::Exceptions::MissingParameter' => {
24         isa => 'Koha::Exceptions::Exception',
25         description => 'A required parameter is missing'
26     },
27     'Koha::Exceptions::WrongParameter' => {
28         isa => 'Koha::Exceptions::Exception',
29         description => 'One or more parameters are wrong',
30     },
31     'Koha::Exceptions::CannotAddLibraryLimit' => {
32         isa => 'Koha::Exceptions::Exception',
33         description => 'General problem adding a library limit'
34     },
35     # Virtualshelves exceptions
36     'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
37         isa => 'Koha::Exceptions::DuplicateObject',
38         description => "Duplicate shelf object",
39     },
40     'Koha::Exceptions::Virtualshelves::InvalidInviteKey' => {
41         isa => 'Koha::Exceptions::Exception',
42         description => 'Invalid key on accepting the share',
43     },
44     'Koha::Exceptions::Virtualshelves::InvalidKeyOnSharing' => {
45         isa => 'Koha::Exceptions::Exception',
46         description=> 'Invalid key on sharing a shelf',
47     },
48     'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
49         isa => 'Koha::Exceptions::Exception',
50         description=> 'Cannot share this shelf, the share has expired',
51     },
52     'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
53         isa => 'Koha::Exceptions::Exception',
54         description => "Invalid use of database administrator account",
55     }
56 );
57
58 1;