[Koha-bugs] [Bug 19828] Koha::Object-> store should catch DBIC exceptions and raise Koha::Exceptions
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Dec 22 08:46:36 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19828
--- Comment #13 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 70098
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70098&action=edit
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 at bywatersolutions.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