Bugzilla – Attachment 83085 Details for
Bug 21980
Add some new Exceptions for Koha::Account methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21980: Add new excpetions for Koha::Account
Bug-21980-Add-new-excpetions-for-KohaAccount.patch (text/plain), 2.34 KB, created by
Martin Renvoize (ashimema)
on 2018-12-12 09:01:35 UTC
(
hide
)
Description:
Bug 21980: Add new excpetions for Koha::Account
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-12-12 09:01:35 UTC
Size:
2.34 KB
patch
obsolete
>From a1fb367387143b91e79665d4ccf0d70ef60d0bfb Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 10 Dec 2018 12:02:41 +0000 >Subject: [PATCH] Bug 21980: Add new excpetions for Koha::Account > >He add two new exceptions here; One to be thrown when negative 'amount' >is passed into verious account methods that always expect positive >decimals and another to be thrown when a bad 'type' is passed into an >account method. > >Sponsored-by: PTFS Europe >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Exceptions/Account.pm | 24 +++++++++++++++++++++--- > 1 file changed, 21 insertions(+), 3 deletions(-) > >diff --git a/Koha/Exceptions/Account.pm b/Koha/Exceptions/Account.pm >index 5cafe5f9ab..4c2e2c3ff7 100644 >--- a/Koha/Exceptions/Account.pm >+++ b/Koha/Exceptions/Account.pm >@@ -23,17 +23,26 @@ use Exception::Class ( > description => 'Something went wrong!', > }, > 'Koha::Exceptions::Account::IsNotCredit' => { >- isa => 'Koha::Exceptions::Account', >+ isa => 'Koha::Exceptions::Account', > description => 'Account line is not a credit' > }, > 'Koha::Exceptions::Account::IsNotDebit' => { >- isa => 'Koha::Exceptions::Account', >+ isa => 'Koha::Exceptions::Account', > description => 'Account line is not a credit' > }, > 'Koha::Exceptions::Account::NoAvailableCredit' => { >- isa => 'Koha::Exceptions::Account', >+ isa => 'Koha::Exceptions::Account', > description => 'No outstanding credit' >+ }, >+ 'Koha::Exceptions::Account::AmountNotPositive' => { >+ isa => 'Koha::Exceptions::Account', >+ description => 'Amount should be a positive decimal' >+ }, >+ 'Koha::Exceptions::Account::UnrecognisedType' => { >+ isa => 'Koha::Exceptions::Account', >+ description => 'Account type was not recognised' > } >+ > ); > > =head1 NAME >@@ -61,6 +70,15 @@ debit and it isn't. > Exception to be used when a credit has no amount outstanding and is required > to be applied to outstanding debits. > >+=head2 Koha::Exceptions::Account::AmountNotPositive >+ >+Exception to be used when a passed credit or debit amount is not a positive >+decimal value. >+ >+=head2 Koha::Exceptions::Account::UnrecognisedType >+ >+Exception to be used when a passed credit or debit is not of a recognised type. >+ > =cut > > 1; >-- >2.19.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21980
:
83008
|
83046
| 83085