diff --git a/C4/Context.pm b/C4/Context.pm index 85d1c1870a..c63641cc63 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -690,7 +690,7 @@ sub _new_dbh my $db_passwd = $context->config("pass"); # MJR added or die here, as we can't work without dbh my $dbh= DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", - $db_user, $db_passwd) or die $DBI::errstr; + $db_user, $db_passwd, {'RaiseError' => $ENV{DEBUG}?1:0 }) or die $DBI::errstr; my $tz = $ENV{TZ}; if ( $db_driver eq 'mysql' ) { # Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.