Bug 29857: Make the exception classes inherit from the base class
We have a base class Koha::Exceptions::Exception but it's not used in most of our exception classes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
5daa64ca10
commit
42096deea4
23 changed files with 67 additions and 24 deletions
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Account;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Account' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Account::IsNotCredit' => {
|
||||
isa => 'Koha::Exceptions::Account',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Acquisition::Basket;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Acquisition::Basket' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Acquisition::Basket::AlreadyClosed' => {
|
||||
isa => 'Koha::Exceptions::Acquisition::Basket',
|
||||
|
|
|
@ -17,9 +17,11 @@ package Koha::Exceptions::ArticleRequest;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
'Koha::Exceptions::ArticleRequest' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::ArticleRequest::LimitReached' => {
|
||||
isa => 'Koha::Exceptions::ArticleRequest',
|
||||
|
@ -43,4 +45,4 @@ Exception to be used when the article request limit has been reached.
|
|||
|
||||
=cut
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Authentication;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Authentication' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Authentication::Required' => {
|
||||
isa => 'Koha::Exceptions::Authentication',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Authorization;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Authorization' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Authorization::Unauthorized' => {
|
||||
isa => 'Koha::Exceptions::Authorization',
|
||||
|
|
|
@ -2,9 +2,11 @@ package Koha::Exceptions::Checkout;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
'Koha::Exceptions::Checkout' => {
|
||||
description => "Something went wrong!"
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Checkout::FailedRenewal' => {
|
||||
isa => 'Koha::Exceptions::Checkout',
|
||||
|
|
|
@ -22,7 +22,6 @@ use Koha::Exceptions::Exception;
|
|||
use Exception::Class (
|
||||
'Koha::Exceptions::Checkouts::ReturnClaims' => {
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
description => 'Something went wrong!',
|
||||
},
|
||||
'Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy' => {
|
||||
isa => 'Koha::Exceptions::Checkouts::ReturnClaims',
|
||||
|
|
|
@ -2,9 +2,11 @@ package Koha::Exceptions::ClubHold;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
'Koha::Exceptions::ClubHold' => {
|
||||
description => "Something went wrong!",
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::ClubHold::NoPatrons' => {
|
||||
isa => 'Koha::Exceptions::ClubHold',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Config;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Config' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Config::MissingEntry' => {
|
||||
isa => 'Koha::Exceptions::Config',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Elasticsearch;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Elasticsearch' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Elasticsearch::BadResponse' => {
|
||||
isa => 'Koha::Exceptions::Elasticsearch',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Ill;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Ill' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Ill::InvalidBackendId' => {
|
||||
isa => 'Koha::Exceptions::Ill',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Item::Transfer;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Item::Transfer' => {
|
||||
description => 'Something went wrong'
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Item::Transfer::InQueue' => {
|
||||
isa => 'Koha::Exceptions::Item::Transfer',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Library;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Library::Exception' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
|
||||
'Koha::Exceptions::Library::NotFound' => {
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::MarcOverlayRule;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::MarcOverlayRule' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::MarcOverlayRule::InvalidTagRegExp' => {
|
||||
isa => 'Koha::Exceptions::MarcOverlayRule',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Metadata;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Metadata' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Metadata::Invalid' => {
|
||||
isa => 'Koha::Exceptions::Metadata',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Password;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Password' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Password::Invalid' => {
|
||||
isa => 'Koha::Exceptions::Password',
|
||||
|
|
|
@ -2,9 +2,11 @@ package Koha::Exceptions::Patron;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
'Koha::Exceptions::Patron' => {
|
||||
description => "Something went wrong!"
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Patron::FailedDelete' => {
|
||||
isa => 'Koha::Exceptions::Patron',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Patron::Attribute;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Patron::Attribute' => {
|
||||
description => 'Something went wrong'
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Patron::Attribute::InvalidType' => {
|
||||
isa => 'Koha::Exceptions::Patron::Attribute',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Patron::Attribute::Type;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Patron::Attribute::Type' => {
|
||||
description => 'Something went wrong'
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Patron::Attribute::Type::CannotChangeProperty' => {
|
||||
isa => 'Koha::Exceptions::Patron::Attribute::Type',
|
||||
|
|
|
@ -2,10 +2,12 @@ package Koha::Exceptions::Patron::Modification;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Patron::Modification' => {
|
||||
description => 'Something went wrong'
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Patron::Modification::DuplicateVerificationToken' => {
|
||||
isa => 'Koha::Exceptions::Patron::Modification',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::Patron::Relationship;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::Patron::Relationship' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Patron::Relationship::DuplicateRelationship' => {
|
||||
isa => 'Koha::Exceptions::Patron::Relationship',
|
||||
|
|
|
@ -17,9 +17,11 @@ package Koha::Exceptions::Token;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
'Koha::Exceptions::Token' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
'Koha::Exceptions::Token::BadPattern' => {
|
||||
isa => 'Koha::Exceptions::Token',
|
||||
|
|
|
@ -17,10 +17,12 @@ package Koha::Exceptions::TransferLimit;
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::Exceptions::Exception;
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'Koha::Exceptions::TransferLimit::Exception' => {
|
||||
description => 'Something went wrong!',
|
||||
isa => 'Koha::Exceptions::Exception',
|
||||
},
|
||||
|
||||
'Koha::Exceptions::TransferLimit::Duplicate' => {
|
||||
|
|
Loading…
Reference in a new issue