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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 3 17:27:36 CET 2019


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

--- Comment #6 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 83624
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83624&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

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

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


More information about the Koha-bugs mailing list