Line 0
Link Here
|
|
|
1 |
package Koha::Exceptions::Item; |
2 |
|
3 |
use Modern::Perl; |
4 |
|
5 |
use Exception::Class ( |
6 |
|
7 |
'Koha::Exceptions::Item' => { |
8 |
description => 'Something went wrong!', |
9 |
}, |
10 |
'Koha::Exceptions::Item::AlreadyHeldForThisPatron' => { |
11 |
isa => 'Koha::Exceptions::Item', |
12 |
description => "Item already held for this patron.", |
13 |
}, |
14 |
'Koha::Exceptions::Item::CannotBeTransferred' => { |
15 |
isa => 'Koha::Exceptions::Item', |
16 |
description => "Item cannot be transferred from holding library to given library.", |
17 |
fields => ["from_library", "to_library"], |
18 |
}, |
19 |
'Koha::Exceptions::Item::CheckedOut' => { |
20 |
isa => 'Koha::Exceptions::Item', |
21 |
description => "Item has already been checked out.", |
22 |
fields => ["borrowernumber", "date_due"], |
23 |
}, |
24 |
'Koha::Exceptions::Item::Damaged' => { |
25 |
isa => 'Koha::Exceptions::Item', |
26 |
description => "Item is marked as damaged.", |
27 |
}, |
28 |
'Koha::Exceptions::Item::FromAnotherLibrary' => { |
29 |
isa => 'Koha::Exceptions::Item', |
30 |
description => "Libraries are independent and item is not from this library.", |
31 |
fields => ["current_library", "from_library"], |
32 |
}, |
33 |
'Koha::Exceptions::Item::Held' => { |
34 |
isa => 'Koha::Exceptions::Item', |
35 |
description => "Item held.", |
36 |
fields => ["borrowernumber", "hold_queue_length", "status"], |
37 |
}, |
38 |
'Koha::Exceptions::Item::HighHolds' => { |
39 |
isa => 'Koha::Exceptions::Item', |
40 |
description => "High demand item. Loan period shortened.", |
41 |
fields => ["num_holds", "duration", "returndate"], |
42 |
}, |
43 |
'Koha::Exceptions::Item::Lost' => { |
44 |
isa => 'Koha::Exceptions::Item', |
45 |
description => "Item is marked as lost.", |
46 |
fields => ["code", "status"], |
47 |
}, |
48 |
'Koha::Exceptions::Item::NotForLoan' => { |
49 |
isa => 'Koha::Exceptions::Item', |
50 |
description => "Item is marked as not for loan.", |
51 |
fields => ["code", "status"], |
52 |
}, |
53 |
'Koha::Exceptions::Item::NotFound' => { |
54 |
isa => 'Koha::Exceptions::Item', |
55 |
description => "Item not found.", |
56 |
fields => ['itemnumber'], |
57 |
}, |
58 |
'Koha::Exceptions::Item::NotForLoanForcing' => { |
59 |
isa => 'Koha::Exceptions::Item', |
60 |
description => "Item is marked as not for loan, but it is possible to override.", |
61 |
fields => ["notforloan"], |
62 |
}, |
63 |
'Koha::Exceptions::Item::Restricted' => { |
64 |
isa => 'Koha::Exceptions::Item', |
65 |
description => "Item is marked as restricted.", |
66 |
}, |
67 |
'Koha::Exceptions::Item::Transfer' => { |
68 |
isa => 'Koha::Exceptions::Item', |
69 |
description => "Item is being transferred.", |
70 |
fields => ["datesent", "from_library", "to_library"], |
71 |
}, |
72 |
'Koha::Exceptions::Item::UnknownBarcode' => { |
73 |
isa => 'Koha::Exceptions::Item', |
74 |
description => "Item has unknown barcode, or no barcode at all.", |
75 |
fields => ["barcode"], |
76 |
}, |
77 |
'Koha::Exceptions::Item::Withdrawn' => { |
78 |
isa => 'Koha::Exceptions::Item', |
79 |
description => "Item is marked as withdrawn.", |
80 |
} |
81 |
|
82 |
); |
83 |
|
84 |
1; |