From e9f2ee3eb67bf399fde0823c3dc80c5b50654998 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 6 Feb 2019 19:40:00 +0000 Subject: [PATCH] Bug 17712: (follow-up) Remove unused exceptions --- Koha/Exceptions.pm | 21 +-------------------- Koha/Exceptions/Biblio.pm | 5 ----- Koha/Exceptions/Checkout.pm | 21 --------------------- Koha/Exceptions/Item.pm | 5 ----- Koha/Exceptions/Patron.pm | 5 ----- 5 files changed, 1 insertion(+), 56 deletions(-) diff --git a/Koha/Exceptions.pm b/Koha/Exceptions.pm index 8744cae..65ebc90 100644 --- a/Koha/Exceptions.pm +++ b/Koha/Exceptions.pm @@ -9,12 +9,7 @@ use Exception::Class ( isa => 'Koha::Exceptions::Exception', description => 'A bad parameter was given', fields => ['parameter'], - }, - 'Koha::Exceptions::BadParameter' => { - isa => 'Koha::Exceptions::Exception', - description => 'A bad parameter was given', - fields => ['parameter'], - }, + }, 'Koha::Exceptions::DuplicateObject' => { isa => 'Koha::Exceptions::Exception', description => 'Same object already exists', @@ -27,30 +22,16 @@ use Exception::Class ( isa => 'Koha::Exceptions::Exception', description => 'The default value cannot be deleted' }, - 'Koha::Exceptions::InvalidDate' => { - isa => 'Koha::Exceptions::Exception', - description => "Date is invalid.", - fields => ["date"], - }, 'Koha::Exceptions::MissingParameter' => { isa => 'Koha::Exceptions::Exception', description => 'A required parameter is missing', fields => ["parameter"], }, - 'Koha::Exceptions::AuthenticationRequired' => { - isa => 'Koha::Exceptions::Exception', - description => 'Authentication is required.', - }, 'Koha::Exceptions::NoPermission' => { isa => 'Koha::Exceptions::Exception', description => 'No permission to access this resource.', fields => ["required_permissions"] }, - 'Koha::Exceptions::NotImplemented' => { - isa => 'Koha::Exceptions::Exception', - description => 'A subroutine is not implemented', - fields => ["subroutine"] - }, 'Koha::Exceptions::NoChanges' => { isa => 'Koha::Exceptions::Exception', description => 'No changes were made', diff --git a/Koha/Exceptions/Biblio.pm b/Koha/Exceptions/Biblio.pm index 21ea965..8f3dbb5 100644 --- a/Koha/Exceptions/Biblio.pm +++ b/Koha/Exceptions/Biblio.pm @@ -7,11 +7,6 @@ use Exception::Class ( 'Koha::Exceptions::Biblio' => { description => 'Something went wrong!', }, - 'Koha::Exceptions::Biblio::AnotherItemCheckedOut' => { - isa => 'Koha::Exceptions::Biblio', - description => "Another item from same biblio already checked out.", - fields => ["itemnumbers"], - }, 'Koha::Exceptions::Biblio::CheckedOut' => { isa => 'Koha::Exceptions::Biblio', description => "Biblio is already checked out for patron.", diff --git a/Koha/Exceptions/Checkout.pm b/Koha/Exceptions/Checkout.pm index 611c338..6b55c3a 100644 --- a/Koha/Exceptions/Checkout.pm +++ b/Koha/Exceptions/Checkout.pm @@ -27,31 +27,10 @@ use Exception::Class ( description => "Maximum number of checkouts have been reached, or none allowed.", fields => ["max_checkouts_allowed", "current_checkout_count"], }, - 'Koha::Exceptions::Checkout::MaximumOnsiteCheckoutsReached' => { - isa => 'Koha::Exceptions::Checkout', - description => "Maximum number of on-site checkouts have been reached.", - fields => ["max_onsite_checkouts", "current_onsite_checkouts"], - }, 'Koha::Exceptions::Checkout::NoMoreRenewals' => { isa => 'Koha::Exceptions::Checkout', description => "No more renewals are allowed.", }, - 'Koha::Exceptions::Checkout::NoRenewalForOnsiteCheckouts' => { - isa => 'Koha::Exceptions::Checkout', - description => "On-site checkouts cannot be renewed.", - }, - 'Koha::Exceptions::Checkout::OnsiteCheckoutsDisabled' => { - isa => 'Koha::Exceptions::Checkout', - description => "On-site checkouts are disabled.", - }, - 'Koha::Exceptions::Checkout::OnsiteCheckoutWillBeSwitched' => { - isa => 'Koha::Exceptions::Checkout', - description => "On-site checkout will be switched to normal checkout.", - }, - 'Koha::Exceptions::Checkout::PreviouslyCheckedOut' => { - isa => 'Koha::Exceptions::Checkout', - description => "This biblio has been previously checked out by this patron.", - }, 'Koha::Exceptions::Checkout::Renew' => { isa => 'Koha::Exceptions::Checkout', description => "Checkout will be renewed.", diff --git a/Koha/Exceptions/Item.pm b/Koha/Exceptions/Item.pm index ee2f7ab..2f580b8 100644 --- a/Koha/Exceptions/Item.pm +++ b/Koha/Exceptions/Item.pm @@ -55,11 +55,6 @@ use Exception::Class ( description => "Item not found.", fields => ['itemnumber'], }, - 'Koha::Exceptions::Item::NotForLoanForcing' => { - isa => 'Koha::Exceptions::Item', - description => "Item is marked as not for loan, but it is possible to override.", - fields => ["notforloan"], - }, 'Koha::Exceptions::Item::Restricted' => { isa => 'Koha::Exceptions::Item', description => "Item is marked as restricted.", diff --git a/Koha/Exceptions/Patron.pm b/Koha/Exceptions/Patron.pm index e3af12d..e138530 100644 --- a/Koha/Exceptions/Patron.pm +++ b/Koha/Exceptions/Patron.pm @@ -57,11 +57,6 @@ use Exception::Class ( isa => 'Koha::Exceptions::Patron', description => "Patron not found.", fields => ['borrowernumber'], - }, - 'Koha::Exceptions::Patron::OtherCharges' => { - isa => 'Koha::Exceptions::Patron', - description => "Patron has other outstanding charges.", - fields => ["balance", "other_charges"], } ); -- 2.1.4