[Koha-bugs] [Bug 22051] Make Koha::Object->store translate 'Incorrect datetime value' exceptions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 28 16:21:43 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22051

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 83536
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83536&action=edit
Bug 22051: Make Koha::Object->store translate incorrect value exceptions

This patch adds a new condition to Koha::Object->store so it catches
incorrect value-related DBIC exceptions.

This DBIC exceptions get now translated into
Koha::Exceptions::Object::BadValue exceptions with relevant parameters
passed.

To test:
- Apply the exception and unit tests patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> FAIL: Tests fail because this exception handling code is not
implemented
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list