1 package Koha::Exceptions::Item::Transfer;
3 # This file is part of Koha.
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.
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.
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>.
22 use Exception::Class (
24 'Koha::Exceptions::Item::Transfer' => {
25 isa => 'Koha::Exception',
27 'Koha::Exceptions::Item::Transfer::InQueue' => {
28 isa => 'Koha::Exceptions::Item::Transfer',
29 description => "Active item transfer already exists",
30 fields => ['transfer']
32 'Koha::Exceptions::Item::Transfer::Limit' => {
33 isa => 'Koha::Exceptions::Item::Transfer',
34 description => "Transfer not allowed"
36 'Koha::Exceptions::Item::Transfer::OnLoan' => {
37 isa => 'Koha::Exceptions::Item::Transfer',
38 description => "Transfer item is currently checked out"
40 'Koha::Exceptions::Item::Transfer::InTransit' => {
41 isa => 'Koha::Exceptions::Item::Transfer',
42 description => "Transfer item is currently in transit"
48 Koha::Exceptions::Item::Transfer - Base class for Transfer exceptions
52 =head2 Koha::Exceptions::Item::Transfer
54 Generic Item::Transfer exception
56 =head2 Koha::Exceptions::Item::Transfer::InQueue
58 Exception to be used when an active item transfer prevents a transfer action.
60 =head2 Koha::Exceptions::Item::Transfer::Limit
62 Exception to be used when transfer limits prevent a transfer action.
64 =head2 Koha::Exceptions::Item::Transfer::OnLoan
66 Exception to be used when an active checkout prevents a transfer action.
68 =head2 Koha::Exceptions::Item::Transfer::InTransit
70 Exception to be used when an in transit transfer prevents a transfer action.