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