Bug 20473: Whitespace
[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::PayloadTooLarge' => {
28         isa => 'Koha::Exception',
29         description => 'Request entity is larger than limits defined by server',
30     },
31     'Koha::Exceptions::ObjectNotCreated' => {
32         isa => 'Koha::Exception',
33         description => 'The object have not been created',
34     },
35     'Koha::Exceptions::CannotDeleteDefault' => {
36         isa => 'Koha::Exception',
37         description => 'The default value cannot be deleted'
38     },
39     'Koha::Exceptions::CannotDeleteSystem' => {
40         isa => 'Koha::Exception',
41         description => 'The system value cannot be deleted'
42     },
43     'Koha::Exceptions::MissingParameter' => {
44         isa => 'Koha::Exception',
45         description => 'A required parameter is missing',
46         fields => ['parameter'],
47     },
48     'Koha::Exceptions::ParameterTooHigh' => {
49         isa => 'Koha::Exception',
50         description => 'A passed parameter value is too high'
51     },
52     'Koha::Exceptions::NoChanges' => {
53         isa => 'Koha::Exception',
54         description => 'No changes were made',
55     },
56     'Koha::Exceptions::WrongParameter' => {
57         isa => 'Koha::Exception',
58         description => 'One or more parameters are wrong',
59     },
60     'Koha::Exceptions::NoPermission' => {
61         isa => 'Koha::Exception',
62         description => 'You do not have permission for this action',
63     },
64     'Koha::Exceptions::CannotAddLibraryLimit' => {
65         isa => 'Koha::Exception',
66         description => 'General problem adding a library limit'
67     },
68     'Koha::Exceptions::UnderMaintenance' => {
69         isa => 'Koha::Exception',
70         description => 'Koha is under maintenance.'
71     },
72 );
73
74 1;