Bugzilla – Attachment 83008 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.27 KB, created by
Martin Renvoize (ashimema)
on 2018-12-10 12:04:55 UTC
(
hide
)
Description:
Bug 21980: Add new excpetions for Koha::Account
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-12-10 12:04:55 UTC
Size:
2.27 KB
patch
obsolete
>From 38e8cbaea539fb9c8a10f4e94e86bda8c03b489e 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. >--- > 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..89c52fcfd4 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