https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37510
Pedro Amorim <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169849|0 |1 is obsolete| | --- Comment #11 from Pedro Amorim <[email protected]> --- Created attachment 169939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169939&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 Signed-off-by: David Nind <[email protected]> Signed-off-by: Pedro Amorim <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
