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>
This commit is contained in:
parent
3533aacef8
commit
8e6cebb6b4
|
|
@ -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…
Reference in New Issue