nicer error reporting
This commit is contained in:
parent
55d8d16ee8
commit
15df989f72
2 changed files with 9 additions and 2 deletions
|
@ -349,7 +349,7 @@ class Database {
|
|||
return $stmt;
|
||||
}
|
||||
catch(PDOException $pdoe) {
|
||||
throw new SCoreException($pdoe->getMessage()."<p>Query: ".$query);
|
||||
throw new SCoreException($pdoe->getMessage()."<p><b>Query:</b> ".$query);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,7 +1094,13 @@ function _load_extensions() {
|
|||
function _fatal_error(Exception $e) {
|
||||
$version = VERSION;
|
||||
$message = $e->getMessage();
|
||||
|
||||
//$trace = var_dump($e->getTrace());
|
||||
|
||||
//$hash = exec("git rev-parse HEAD");
|
||||
//$h_hash = $hash ? "<p><b>Hash:</b> $hash" : "";
|
||||
//'.$h_hash.'
|
||||
|
||||
header("HTTP/1.0 500 Internal Error");
|
||||
echo '
|
||||
<html>
|
||||
|
@ -1103,7 +1109,8 @@ function _fatal_error(Exception $e) {
|
|||
</head>
|
||||
<body>
|
||||
<h1>Internal Error</h1>
|
||||
<p>'.$message.'
|
||||
<p><b>Message:</b> '.$message.'
|
||||
<p><b>Version:</b> '.$version.'
|
||||
</body>
|
||||
</html>
|
||||
';
|
||||
|
|
Reference in a new issue