From 15df989f725a2515e4ff43e2abe360d207cc73a2 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 31 Mar 2012 17:07:11 +0100 Subject: [PATCH] nicer error reporting --- core/database.class.php | 2 +- core/util.inc.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index fc93269f..5f2c1c72 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -349,7 +349,7 @@ class Database { return $stmt; } catch(PDOException $pdoe) { - throw new SCoreException($pdoe->getMessage()."

Query: ".$query); + throw new SCoreException($pdoe->getMessage()."

Query: ".$query); } } diff --git a/core/util.inc.php b/core/util.inc.php index 9fce4dda..d2582d59 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -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 ? "

Hash: $hash" : ""; + //'.$h_hash.' + header("HTTP/1.0 500 Internal Error"); echo ' @@ -1103,7 +1109,8 @@ function _fatal_error(Exception $e) {

Internal Error

-

'.$message.' +

Message: '.$message.' +

Version: '.$version.' ';