From 8e6cebb6b4553bc15c2ee95de9f3e6b3f895e258 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 31 Mar 2020 17:27:12 +0200 Subject: [PATCH] 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 --- Koha/Object.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Object.pm b/Koha/Object.pm index e56f4b18f4..fde0fa9917 100644 --- a/Koha/Object.pm +++ b/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 -- 2.39.5