Bug 29897: Improve syspref's description
[koha.git] / Koha / Exceptions.pm
1 package Koha::Exceptions;
2
3 use Modern::Perl;
4
5 use Koha::Exception;
6
7 use Exception::Class (
8
9     'Koha::Exceptions::BadParameter' => {
10         isa => 'Koha::Exception',
11         description => 'A bad parameter was given',
12         fields => ['parameter'],
13     },
14     'Koha::Exceptions::DuplicateObject' => {
15         isa => 'Koha::Exception',
16         description => 'Same object already exists',
17     },
18     'Koha::Exceptions::InvalidStatus' => {
19         isa         => 'Koha::Exception',
20         description => 'The current status is not valid in context',
21         fields      => ['invalid_status'],
22     },
23     'Koha::Exceptions::ObjectNotFound' => {
24         isa => 'Koha::Exception',
25         description => 'The required object doesn\'t exist',
26     },
27     'Koha::Exceptions::ObjectNotCreated' => {
28         isa => 'Koha::Exception',
29         description => 'The object have not been created',
30     },
31     'Koha::Exceptions::CannotDeleteDefault' => {
32         isa => 'Koha::Exception',
33         description => 'The default value cannot be deleted'
34     },
35     'Koha::Exceptions::MissingParameter' => {
36         isa => 'Koha::Exception',
37         description => 'A required parameter is missing'
38     },
39     'Koha::Exceptions::ParameterTooHigh' => {
40         isa => 'Koha::Exception',
41         description => 'A passed parameter value is too high'
42     },
43     'Koha::Exceptions::NoChanges' => {
44         isa => 'Koha::Exception',
45         description => 'No changes were made',
46     },
47     'Koha::Exceptions::WrongParameter' => {
48         isa => 'Koha::Exception',
49         description => 'One or more parameters are wrong',
50     },
51     'Koha::Exceptions::NoPermission' => {
52         isa => 'Koha::Exception',
53         description => 'You do not have permission for this action',
54     },
55     'Koha::Exceptions::CannotAddLibraryLimit' => {
56         isa => 'Koha::Exception',
57         description => 'General problem adding a library limit'
58     },
59     'Koha::Exceptions::UnderMaintenance' => {
60         isa => 'Koha::Exception',
61         description => 'Koha is under maintenance.'
62     },
63 );
64
65 1;