Koha-clms/Koha/Exceptions
Tomas Cohen Arazi 84a8f09ec2 Bug 19828: Make Koha::Object->store translate DBIC exceptions into Koha exceptions
This patch introduces a try/catch block in store() and parses the error
when an exceptional situation takes place.

It only deals with FK constraint violations and duplicate IDs. The rest of the DBIC exceptions
are rethrown.

To test:

- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-22 13:15:38 -03:00
..
Patron Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable 2017-03-31 14:36:47 +00:00
Authentication.pm Bug 18137: Add useful Koha::Exceptions 2017-09-21 11:27:04 -03:00
Authorization.pm Bug 18137: Add useful Koha::Exceptions 2017-09-21 11:27:04 -03:00
Config.pm Bug 19542: Add a check for ES configuration health 2017-12-11 14:30:42 -03:00
Ill.pm Bug 7317: Handle missing email addresses gracefuly 2017-11-09 11:42:15 -03:00
Object.pm Bug 19828: Make Koha::Object->store translate DBIC exceptions into Koha exceptions 2017-12-22 13:15:38 -03:00