https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37510 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 169830 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169830&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.