Koha-clms/Koha/Exceptions
Tomas Cohen Arazi 923dc5e078
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>
2024-08-16 17:33:46 +02:00
..
Acquisition
…
Checkouts
…
ERM/EUsage
…
Item
…
Patron
…
Account.pm
…
ArticleRequest.pm
…
Auth.pm
…
Authentication.pm
…
Authorization.pm
…
BackgroundJob.pm
…
Booking.pm
…
Calendar.pm
…
Checkin.pm
…
Checkout.pm
…
CirculationRule.pm
…
ClubHold.pm
…
Config.pm
…
CurbsidePickup.pm
…
Elasticsearch.pm
…
Hold.pm
…
Ill.pm
…
Library.pm
…
MarcOverlayRule.pm
…
Metadata.pm
…
Object.pm Bug 37510: Make Koha::Object->delete throw Koha::Exception 2024-08-16 17:33:46 +02:00
Password.pm
…
Patron.pm
…
Plugin.pm
…
Preservation.pm
…
REST.pm
…
Suggestion.pm
…
SysPref.pm
…
Token.pm
…
TransferLimit.pm
…
Virtualshelf.pm
…
XSLT.pm
…