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>.
20 use Exception::Class (
22 'Koha::Exceptions::Item::Transfer' => {
23 description => 'Something went wrong'
25 'Koha::Exceptions::Item::Transfer::Found' => {
26 isa => 'Koha::Exceptions::Item::Transfer',
27 description => "Active item transfer already exists",
28 fields => ['transfer']
30 'Koha::Exceptions::Item::Transfer::Limit' => {
31 isa => 'Koha::Exceptions::Item::Transfer',
32 description => "Transfer not allowed"
34 'Koha::Exceptions::Item::Transfer::Out' => {
35 isa => 'Koha::Exceptions::Item::Transfer',
36 description => "Transfer item is currently checked out"
38 'Koha::Exceptions::Item::Transfer::Transit' => {
39 isa => 'Koha::Exceptions::Item::Transfer',
40 description => "Transfer item is currently in transit"
46 Koha::Exceptions::Item::Transfer - Base class for Transfer exceptions
50 =head2 Koha::Exceptions::Item::Transfer
52 Generic Item::Transfer exception
54 =head2 Koha::Exceptions::Item::Transfer::Found
56 Exception to be used when an active item transfer prevents a transfer action.
58 =head2 Koha::Exceptions::Item::Transfer::Limit
60 Exception to be used when transfer limits prevent a transfer action.
62 =head2 Koha::Exceptions::Item::Transfer::Out
64 Exception to be used when an active checkout prevents a transfer action.
66 =head2 Koha::Exceptions::Item::Transfer::Transit
68 Exception to be used when an in transit transfer prevents a transfer action.