Lines 1-5
Link Here
|
1 |
package Koha::Exceptions::Item::Transfer; |
1 |
package Koha::Exceptions::Item::Transfer; |
2 |
|
2 |
|
|
|
3 |
# This file is part of Koha. |
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
14 |
# |
15 |
# You should have received a copy of the GNU General Public License |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
17 |
|
3 |
use Modern::Perl; |
18 |
use Modern::Perl; |
4 |
|
19 |
|
5 |
use Exception::Class ( |
20 |
use Exception::Class ( |
Lines 8-26
use Exception::Class (
Link Here
|
8 |
description => 'Something went wrong' |
23 |
description => 'Something went wrong' |
9 |
}, |
24 |
}, |
10 |
'Koha::Exceptions::Item::Transfer::Found' => { |
25 |
'Koha::Exceptions::Item::Transfer::Found' => { |
11 |
isa => 'Koha::Exceptions::Item::Transfer', |
26 |
isa => 'Koha::Exceptions::Item::Transfer', |
12 |
description => "Active item transfer already exists", |
27 |
description => "Active item transfer already exists", |
13 |
fields => ['transfer'] |
28 |
fields => ['transfer'] |
14 |
}, |
29 |
}, |
15 |
'Koha::Exceptions::Item::Transfer::Limit' => { |
30 |
'Koha::Exceptions::Item::Transfer::Limit' => { |
16 |
isa => 'Koha::Exceptions::Item::Transfer', |
31 |
isa => 'Koha::Exceptions::Item::Transfer', |
17 |
description => "Transfer not allowed" |
32 |
description => "Transfer not allowed" |
18 |
}, |
33 |
}, |
19 |
'Koha::Exceptions::Item::Transfer::Out' => { |
34 |
'Koha::Exceptions::Item::Transfer::Out' => { |
20 |
isa => 'Koha::Exceptions::Item::Transfer', |
35 |
isa => 'Koha::Exceptions::Item::Transfer', |
21 |
description => "Transfer item is currently checked out" |
36 |
description => "Transfer item is currently checked out" |
|
|
37 |
}, |
38 |
'Koha::Exceptions::Item::Transfer::Transit' => { |
39 |
isa => 'Koha::Exceptions::Item::Transfer', |
40 |
description => "Transfer item is currently in transit" |
22 |
} |
41 |
} |
23 |
|
|
|
24 |
); |
42 |
); |
25 |
|
43 |
|
|
|
44 |
=head1 NAME |
45 |
|
46 |
Koha::Exceptions::Item::Transfer - Base class for Transfer exceptions |
47 |
|
48 |
=head1 Exceptions |
49 |
|
50 |
=head2 Koha::Exceptions::Item::Transfer |
51 |
|
52 |
Generic Item::Transfer exception |
53 |
|
54 |
=head2 Koha::Exceptions::Item::Transfer::Found |
55 |
|
56 |
Exception to be used when an active item transfer prevents a transfer action. |
57 |
|
58 |
=head2 Koha::Exceptions::Item::Transfer::Limit |
59 |
|
60 |
Exception to be used when transfer limits prevent a transfer action. |
61 |
|
62 |
=head2 Koha::Exceptions::Item::Transfer::Out |
63 |
|
64 |
Exception to be used when an active checkout prevents a transfer action. |
65 |
|
66 |
=head2 Koha::Exceptions::Item::Transfer::Transit |
67 |
|
68 |
Exception to be used when an in transit transfer prevents a transfer action. |
69 |
|
70 |
=cut |
71 |
|
26 |
1; |
72 |
1; |