From e3f4a9fd63549027d3c5c0bafbf95a184badca87 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 --- 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.20.1