updated exception

This commit is contained in:
kremsy 2017-05-24 10:05:28 +02:00
parent edcd18e8f5
commit a32e7df5e0
3 changed files with 3 additions and 1 deletions

View File

@ -332,7 +332,7 @@ class Server implements CallbackListener, CommandListener, UsageInformationAble
$login = Player::parseLogin($login); $login = Player::parseLogin($login);
try { try {
$replay = $this->maniaControl->getClient()->getValidationReplay($login); $replay = $this->maniaControl->getClient()->getValidationReplay($login);
} catch (Exception $e) { } catch (Exception $e) { //UnavailableFeature Exception
$this->maniaControl->getErrorHandler()->triggerDebugNotice("Exception line 330 Server.php" . $e->getMessage()); $this->maniaControl->getErrorHandler()->triggerDebugNotice("Exception line 330 Server.php" . $e->getMessage());
Logger::logError("Couldn't get validation replay of '{$login}'. " . $e->getMessage()); Logger::logError("Couldn't get validation replay of '{$login}'. " . $e->getMessage());
return null; return null;

View File

@ -23,6 +23,7 @@ class FaultException extends Exception {
case 'No replay to save': case 'No replay to save':
case 'Internal error.': case 'Internal error.':
case 'Unable to retrieve validation data. ': case 'Unable to retrieve validation data. ':
case 'No new replay.':
return new UnavailableFeatureException($faultString, $faultCode); return new UnavailableFeatureException($faultString, $faultCode);
case 'You must enable the callbacks to be able to do chat routing.': case 'You must enable the callbacks to be able to do chat routing.':
case 'Chat routing not enabled.': case 'Chat routing not enabled.':

View File

@ -54,6 +54,7 @@ class DedimaniaWebHandler implements TimerListener {
if (!$data || $error) { if (!$data || $error) {
Logger::logError("Dedimania Error while opening session: '{$error}' Line 42"); Logger::logError("Dedimania Error while opening session: '{$error}' Line 42");
} }
$data = $this->decode($data); $data = $this->decode($data);
if (!is_array($data) || empty($data)) { if (!is_array($data) || empty($data)) {