View | Details | Raw Unified | Return to bug 18137
Collapse All | Expand All

(-)a/Koha/Exceptions.pm (+9 lines)
Lines 9-14 use Exception::Class ( Link Here
9
        description => 'Something went wrong!',
9
        description => 'Something went wrong!',
10
    },
10
    },
11
11
12
    'Koha::Exceptions::BadParameter' => {
13
        isa => 'Koha::Exceptions::Exception',
14
        description => 'Bad parameter was given',
15
        fields => ["parameter"],
16
    },
12
    'Koha::Exceptions::DuplicateObject' => {
17
    'Koha::Exceptions::DuplicateObject' => {
13
        isa => 'Koha::Exceptions::Exception',
18
        isa => 'Koha::Exceptions::Exception',
14
        description => 'Same object already exists',
19
        description => 'Same object already exists',
Lines 21-26 use Exception::Class ( Link Here
21
        isa => 'Koha::Exceptions::Exception',
26
        isa => 'Koha::Exceptions::Exception',
22
        description => 'A required parameter is missing'
27
        description => 'A required parameter is missing'
23
    },
28
    },
29
    'Koha::Exceptions::UnderMaintenance' => {
30
        isa => 'Koha::Exceptions::Exception',
31
        description => 'Koha is under maintenance.'
32
    },
24
    # Virtualshelves exceptions
33
    # Virtualshelves exceptions
25
    'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
34
    'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
26
        isa => 'Koha::Exceptions::DuplicateObject',
35
        isa => 'Koha::Exceptions::DuplicateObject',
(-)a/Koha/Exceptions/Authentication.pm (+21 lines)
Line 0 Link Here
1
package Koha::Exceptions::Authentication;
2
3
use Modern::Perl;
4
5
use Exception::Class (
6
7
    'Koha::Exceptions::Authentication' => {
8
        description => 'Something went wrong!',
9
    },
10
    'Koha::Exceptions::Authentication::Required' => {
11
        isa => 'Koha::Exceptions::Authentication',
12
        description => 'Authentication required'
13
    },
14
    'Koha::Exceptions::Authentication::SessionExpired' => {
15
        isa => 'Koha::Exceptions::Authentication',
16
        description => 'Session has been expired',
17
    },
18
19
);
20
21
1;
(-)a/Koha/Exceptions/Authorization.pm (-1 / +18 lines)
Line 0 Link Here
0
- 
1
package Koha::Exceptions::Authorization;
2
3
use Modern::Perl;
4
5
use Exception::Class (
6
7
    'Koha::Exceptions::Authorization' => {
8
        description => 'Something went wrong!',
9
    },
10
    'Koha::Exceptions::Authorization::Unauthorized' => {
11
        isa => 'Koha::Exceptions::Authorization',
12
        description => 'Unauthorized',
13
        fields => ['required_permissions']
14
    },
15
16
);
17
18
1;

Return to bug 18137