CC-3755: Found Exception in apache's error log

-Return error code so that python services automatically retry later.
This commit is contained in:
Martin Konecny 2012-05-04 12:40:44 -04:00
parent b4cd429204
commit 22c5da1629

View file

@ -61,7 +61,13 @@ class Application_Model_Preference
." VALUES ($id, '$key', $value)";
}
}
return $con->exec($sql);
try {
$con->exec($sql);
} catch (Exception $e){
Logging::log("Could not connect to database.");
header('HTTP/1.0 503 Service Unavailable');
exit;
}
}
public static function GetValue($key, $isUserValue = false){