[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
Tue Jan 8 19:19:40 CET 2019


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

--- Comment #12 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 83725
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83725&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>

Signed-off-by: Charles Farmer <charles.farmer at inLibro.com>

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

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


More information about the Koha-bugs mailing list