Bug 9573: Lost items report - Add items.notforloan as a filter
[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::BadParameter' => {
12         isa => 'Koha::Exceptions::Exception',
13         description => 'Bad parameter was given',
14         fields => ["parameter"],
15     },
16     'Koha::Exceptions::DuplicateObject' => {
17         isa => 'Koha::Exceptions::Exception',
18         description => 'Same object already exists',
19     },
20     'Koha::Exceptions::ObjectNotFound' => {
21         isa => 'Koha::Exceptions::Exception',
22         description => 'The required object doesn\'t exist',
23     },
24     'Koha::Exceptions::CannotDeleteDefault' => {
25         isa => 'Koha::Exceptions::Exception',
26         description => 'The default value cannot be deleted'
27     },
28     'Koha::Exceptions::MissingParameter' => {
29         isa => 'Koha::Exceptions::Exception',
30         description => 'A required parameter is missing'
31     },
32     'Koha::Exceptions::WrongParameter' => {
33         isa => 'Koha::Exceptions::Exception',
34         description => 'One or more parameters are wrong',
35     },
36     'Koha::Exceptions::NoPermission' => {
37         isa => 'Koha::Exceptions::Exception',
38         description => 'You do not have permission for this action',
39     },
40     'Koha::Exceptions::CannotAddLibraryLimit' => {
41         isa => 'Koha::Exceptions::Exception',
42         description => 'General problem adding a library limit'
43     },
44     'Koha::Exceptions::UnderMaintenance' => {
45         isa => 'Koha::Exceptions::Exception',
46         description => 'Koha is under maintenance.'
47     },
48     # Virtualshelves exceptions
49     'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
50         isa => 'Koha::Exceptions::DuplicateObject',
51         description => "Duplicate shelf object",
52     },
53     'Koha::Exceptions::Virtualshelves::InvalidInviteKey' => {
54         isa => 'Koha::Exceptions::Exception',
55         description => 'Invalid key on accepting the share',
56     },
57     'Koha::Exceptions::Virtualshelves::InvalidKeyOnSharing' => {
58         isa => 'Koha::Exceptions::Exception',
59         description=> 'Invalid key on sharing a shelf',
60     },
61     'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
62         isa => 'Koha::Exceptions::Exception',
63         description=> 'Cannot share this shelf, the share has expired',
64     },
65     'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
66         isa => 'Koha::Exceptions::Exception',
67         description => "Invalid use of database administrator account",
68     }
69 );
70
71 1;