log response on failed reports

This commit is contained in:
Steffen Schröder 2014-05-24 21:49:17 +02:00
parent 8822c79108
commit 2666d8b616

View File

@ -85,12 +85,12 @@ class ErrorHandler {
$info = base64_encode($json);
$url = ManiaControl::URL_WEBSERVICE . 'errorreport?error=' . urlencode($info);
$success = FileUtil::loadFile($url);
if (!json_decode($success)) {
logMessage('Exception-Report failed!');
} else {
$response = FileUtil::loadFile($url);
$success = json_decode($response);
if ($success) {
logMessage('Exception successfully reported!');
} else {
logMessage('Exception-Report failed! ' . print_r($response, true));
}
}
@ -250,12 +250,12 @@ class ErrorHandler {
$info = base64_encode($json);
$url = ManiaControl::URL_WEBSERVICE . 'errorreport?error=' . urlencode($info);
$success = FileUtil::loadFile($url);
$success = json_decode($success);
$response = FileUtil::loadFile($url);
$success = json_decode($response);
if ($success) {
logMessage('Error successfully reported!');
} else {
logMessage('Error-Report failed!');
logMessage('Error-Report failed! ' . print_r($response, true));
}
}
if ($this->shouldStopExecution($errorNumber)) {