http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7184
Bug #: 7184 Summary: have mysql returning errors Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing AssignedTo: paul.poul...@biblibre.com ReportedBy: paul.poul...@biblibre.com QAContact: ian.wa...@bywatersolutions.com Blocks: 7119 Koha staff interface doesn't complain when there is an SQL error, except in the logs. That can result in strange situations, where the user don't see there is a problem, even if there is. There is an easy solution to this problem : RaiseError in C4/Context.pm, the line my $dbh= DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", $db_user, $db_passwd) or die $DBI::errstr; just has to be replaced by my $dbh= DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", $db_user, $db_passwd, {RaiseError => 1}) or die $DBI::errstr; We also could deal with the DebugLevel systempreference to raise the error only if the library has set it. Something like: {'RaiseError' => C4::Context->preference("DebugLevel")?1:0} My preference goes to the 2nd option = raise error only if DebugLevel is set -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/