Namespace added to Exception

This commit is contained in:
4Giedrius committed 2014-12-09 18:00:34 +02:00
1 parent cb724420ea
commit 8814dd59a8
6 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ class Service implements InjectionAwareInterface
try {
$api->extension_get_list();
} catch(Exception $e) {
} catch(\Exception $e) {
error_log($e);
}
@@ -95,7 +95,7 @@ class Admin extends \Api_Abstract
try {
$id = $service->importYouhostingAccount($account, $this->getApiAdmin());
$log[] = 'Imported order #'.$id.' Youhosting account '.$account['domain'];
} catch(Exception $e) {
} catch(\Exception $e) {
$log[] = $e->getMessage();
}
@@ -135,7 +135,7 @@ class Admin extends \Api_Abstract
try {
$service->importYouhostingClient($client, $this->getApiAdmin());
$log[] = 'Imported client '.$client['email'];
} catch(Exception $e) {
} catch(\Exception $e) {
$log[] = $e->getMessage();
}
}
@@ -100,7 +100,7 @@ class Client extends \Api_Abstract
$result = $this->getService()->getApi()->call('Client.create', $params);
$id = $result['id'];
} catch(Exception $e) {
} catch(\Exception $e) {
if($e->getCode() == 5108) {
$yh_clients = $this->getService()->getApi()->call('Client.getList', array('email' => $client->email));
@@ -113,7 +113,7 @@ class Guest extends \Api_Abstract
try {
$result = $this->getService()->getApi()->call('Settings.subdomains');
$cache->set($key, $result);
} catch(Exception $e) {
} catch(\Exception $e) {
error_log($e->getMessage());
$result = array();
}
+3 -3
View File
@@ -139,7 +139,7 @@ class Service
try {
$this->getApi()->call('Account.suspend', $params);
} catch(Exception $e) {
} catch(\Exception $e) {
//6401 = Account not found
if($e->getCode() == 6401) {
return true;
@@ -192,7 +192,7 @@ class Service
$o = $this->api_admin->order_get(array('id'=>$order['id']));
$params = array('id'=>$o['meta']['yh_account_id']);
$this->getApi()->call('Account.delete', $params);
} catch(Exception $e) {
} catch(\Exception $e) {
error_log($e);
}
@@ -430,7 +430,7 @@ class Service
$c = $yhc['list'][0];
try {
$client_id = $this->importYouhostingClient($c, $api_admin);
} catch(Exception $e) {
} catch(\Exception $e) {
error_log($e->getMessage());
}
}
+1 -1
View File
@@ -62,7 +62,7 @@ class Service
$query="INSERT INTO setting (param, value, created_at, updated_at) VALUES (:param, :value, :created_at, :updated_at)";
$stmt = $pdo->prepare($query);
$stmt->execute(array('param'=>$param, 'value'=>$value, 'created_at'=>date('c'), 'updated_at'=>date('c')));
} catch(Exception $e) {
} catch(\Exception $e) {
//ignore duplicate key error
if($e->getCode() != 23000) {
throw $e;