mirror of
https://github.com/nextcloud/server.git
synced 2025-10-26 19:21:34 +00:00
write sql errors into the error log for better debugging
This commit is contained in:
parent
9ee528bc74
commit
a4c47c674d
@ -246,6 +246,7 @@ class OC_DB {
|
||||
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
|
||||
$entry .= 'Offending command was: '.$query.'<br />';
|
||||
OC_Log::write('core',$entry,OC_Log::FATAL);
|
||||
error_log('DB error: '.$entry);
|
||||
die( $entry );
|
||||
}
|
||||
}else{
|
||||
@ -255,6 +256,7 @@ class OC_DB {
|
||||
$entry = 'DB Error: "'.$e->getMessage().'"<br />';
|
||||
$entry .= 'Offending command was: '.$query.'<br />';
|
||||
OC_Log::write('core',$entry,OC_Log::FATAL);
|
||||
error_log('DB error: '.$entry);
|
||||
die( $entry );
|
||||
}
|
||||
$result=new PDOStatementWrapper($result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user