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> |
||
|---|---|---|
| .. | ||
| 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 | ||
| Password.pm | ||
| Patron.pm | ||
| Plugin.pm | ||
| Preservation.pm | ||
| REST.pm | ||
| Suggestion.pm | ||
| SysPref.pm | ||
| Token.pm | ||
| TransferLimit.pm | ||
| Virtualshelf.pm | ||
| XSLT.pm | ||