Browse Source

Bug 22001: Add the DBI error message

Using DBIx::Class error handler, we should not hide the error when
encapsulating it

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Jonathan Druart 4 years ago
committed by Martin Renvoize
parent
commit
8e6cebb6b4
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 1
      Koha/Object.pm

1
Koha/Object.pm

@ -166,6 +166,7 @@ sub store {
catch {
# Catch problems and raise relevant exceptions
if (ref($_) eq 'DBIx::Class::Exception') {
warn $_->{msg};
if ( $_->{msg} =~ /Cannot add or update a child row: a foreign key constraint fails/ ) {
# FK constraints
# FIXME: MySQL error, if we support more DB engines we should implement this for each

Loading…
Cancel
Save