improvements error handler

This commit is contained in:
kremsy 2014-02-10 23:03:25 +01:00 committed by Steffen Schröder
parent 1e9403e395
commit 373b4bdae1

View File

@ -78,8 +78,8 @@ class ErrorHandler {
$errorTag = $this->getErrorTag($errorNumber); $errorTag = $this->getErrorTag($errorNumber);
$message = "{$errorTag}: {$errorString} in File '{$errorFile}' on Line {$errorLine}!"; $message = "{$errorTag}: {$errorString} in File '{$errorFile}' on Line {$errorLine}!";
logMessage($message); logMessage($message);
if ($errorNumber == E_ERROR || $errorNumber == E_USER_ERROR) {
if ($errorNumber != E_USER_ERROR && $errorNumber != E_USER_WARNING && $errorNumber != E_USER_NOTICE) {
$error = array(); $error = array();
$error["Type"] = "Error"; $error["Type"] = "Error";
$error["Message"] = $message; $error["Message"] = $message;
@ -101,7 +101,9 @@ class ErrorHandler {
if (!json_decode($success)) { if (!json_decode($success)) {
logMessage("Error-Report failed"); logMessage("Error-Report failed");
} }
}
if ($errorNumber == E_ERROR || $errorNumber == E_USER_ERROR) {
logMessage('Stopping execution...'); logMessage('Stopping execution...');
exit(); exit();
} }