Koha-clms/Koha/Exceptions
Tomas Cohen Arazi 3a95803c5e Bug 37510: Make Koha::Object->delete throw Koha::Exception
This patch makes Koha::Object->delete wrap DBIC exceptions on FK
constraints and throw a Koha::Exception::Object::FKConstraint exception
instead. This will allow us better handling it from the callers.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Object.t
=> FAIL: A DBIC exception is thrown instead, tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 923dc5e078)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-09-11 16:41:16 +00:00
..
Acquisition Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Checkouts Bug 30275: (follow-up) Drop renewer_id constraint 2022-07-05 09:46:18 -03:00
ERM/EUsage Bug 34587: Move everything into a ERM/EUsage subfolder 2023-10-31 16:46:18 -03:00
Item Bug 33817: Enforce server-side 2023-07-10 15:43:09 -03:00
Patron Bug 32610: (QA follow-up) Tidy exceptions file 2024-04-30 17:09:52 +02:00
Account.pm Bug 33176: Enforce bad values 2023-06-12 11:52:07 -03:00
ArticleRequest.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Auth.pm Bug 31378: Add Auth mojo plugin 2022-11-08 14:30:33 -03:00
Authentication.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Authorization.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
BackgroundJob.pm Bug 30360: Add helper methods to Koha::BackgroundJobs 2022-05-05 16:11:36 +01:00
Booking.pm Bug 29002: Add bookings objects and API classes 2023-11-03 12:04:07 -03:00
Calendar.pm Bug 27249: Add missing POD for Koha::Exceptions::Calendar 2023-10-17 14:45:33 -03:00
Checkin.pm Bug 32121: Show an alert when adding a checked out item to an item bundle 2023-03-27 12:50:02 +02:00
Checkout.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
CirculationRule.pm Bug 33028: (follow-up) Add POD to new Exception 2023-07-19 12:06:49 -03:00
ClubHold.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Config.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
CurbsidePickup.pm Bug 30650: Prevent pickup to be created on holiday 2022-07-29 15:00:51 -03:00
Elasticsearch.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Hold.pm Bug 31692: Add Koha::Hold::change_type and unit tests 2023-10-10 09:58:57 -03:00
Ill.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Library.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
MarcOverlayRule.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Metadata.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Object.pm Bug 37510: Make Koha::Object->delete throw Koha::Exception 2024-09-11 16:41:16 +00:00
Password.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Patron.pm Bug 26170: Add protected status for patrons 2023-11-01 17:23:06 -03:00
Plugin.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Preservation.pm Bug 30708: Tidy perl files 2023-10-18 15:42:04 -03:00
REST.pm Bug 37018: Add Koha::Exceptions::REST 2024-07-25 15:10:22 +00:00
Suggestion.pm Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store 2023-09-18 15:31:45 -03:00
SysPref.pm Bug 30007: Add Koha::Exceptions::SysPref 2022-03-01 22:47:47 -10:00
Token.pm Bug 34478: op-cud - Trick CGI directly 2024-03-01 10:56:04 +01:00
TransferLimit.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Virtualshelf.pm Bug 30057: Move virtualshelf-related exceptions to a separate library 2022-06-06 14:30:37 -03:00
XSLT.pm Bug 12758: (QA follow-up) Enhance POD 2022-11-09 09:58:56 -03:00