Summary: | account->add_credit does not rethrow exception | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.03,22.11.09,22.05.16
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 33608 | ||
Attachments: | Bug 34316: Add_credit should rethrow an exception correctly |
Description
Marcel de Rooy
2023-07-20 07:28:52 UTC
Created attachment 153697 [details] [review] Bug 34316: Add_credit should rethrow an exception correctly Found while running Items.t on top of 33608. Another exception was thrown but not rethrown. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> (In reply to Marcel de Rooy from comment #0) > Found while debugging 33608 on a new failure in Items.t. > It was a FK constraint on credit_id which was very misleading. > Cause is an exception that was not rethrown in Accounts coming from a wrong > statistic type and revealed now by new code in UpdateStats/Statistic.pm. Actually, there is still another thing ;) Related to new code that looks at value instead of amount. So 33608 needs a correction too. Rethrowing the exception should go here on its own. Moving to PQA. Trivial and needed. Looks good to me Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.03 Nice work everyone! Pushed to 22.11.x for next release Backported to 22.05.x for upcoming 22.05.16 |