Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview
[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
12     'Koha::Exceptions::DuplicateObject' => {
13         isa => 'Koha::Exceptions::Exception',
14         description => 'Same object already exists',
15     },
16     'Koha::Exceptions::CannotDeleteDefault' => {
17         isa => 'Koha::Exceptions::Exception',
18         description => 'The default value cannot be deleted'
19     },
20     'Koha::Exceptions::MissingParameter' => {
21         isa => 'Koha::Exceptions::Exception',
22         description => 'A required parameter is missing'
23     },
24     # Virtualshelves exceptions
25     'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
26         isa => 'Koha::Exceptions::DuplicateObject',
27         description => "Duplicate shelf object",
28     },
29     'Koha::Exceptions::Virtualshelves::InvalidInviteKey' => {
30         isa => 'Koha::Exceptions::Exception',
31         description => 'Invalid key on accepting the share',
32     },
33     'Koha::Exceptions::Virtualshelves::InvalidKeyOnSharing' => {
34         isa => 'Koha::Exceptions::Exception',
35         description=> 'Invalid key on sharing a shelf',
36     },
37     'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
38         isa => 'Koha::Exceptions::Exception',
39         description=> 'Cannot share this shelf, the share has expired',
40     },
41     'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
42         isa => 'Koha::Exceptions::Exception',
43         description => "Invalid use of database administrator account",
44     }
45 );
46
47 1;