diff --git a/src/bb-modules/Extension/Service.php b/src/bb-modules/Extension/Service.php index ff8fa7740..75ccbf728 100644 --- a/src/bb-modules/Extension/Service.php +++ b/src/bb-modules/Extension/Service.php @@ -59,7 +59,7 @@ class Service implements InjectionAwareInterface try { $api->extension_get_list(); - } catch(Exception $e) { + } catch(\Exception $e) { error_log($e); } diff --git a/src/bb-modules/Serviceyouhosting/Api/Admin.php b/src/bb-modules/Serviceyouhosting/Api/Admin.php index e41486004..2181f1cfb 100644 --- a/src/bb-modules/Serviceyouhosting/Api/Admin.php +++ b/src/bb-modules/Serviceyouhosting/Api/Admin.php @@ -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(); } } diff --git a/src/bb-modules/Serviceyouhosting/Api/Client.php b/src/bb-modules/Serviceyouhosting/Api/Client.php index 5566912a7..26c83a8e6 100644 --- a/src/bb-modules/Serviceyouhosting/Api/Client.php +++ b/src/bb-modules/Serviceyouhosting/Api/Client.php @@ -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)); diff --git a/src/bb-modules/Serviceyouhosting/Api/Guest.php b/src/bb-modules/Serviceyouhosting/Api/Guest.php index 39a2ac50a..b4dc7ccfc 100644 --- a/src/bb-modules/Serviceyouhosting/Api/Guest.php +++ b/src/bb-modules/Serviceyouhosting/Api/Guest.php @@ -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(); } diff --git a/src/bb-modules/Serviceyouhosting/Service.php b/src/bb-modules/Serviceyouhosting/Service.php index fbdea8ccf..a82a21cbc 100644 --- a/src/bb-modules/Serviceyouhosting/Service.php +++ b/src/bb-modules/Serviceyouhosting/Service.php @@ -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()); } } diff --git a/src/bb-modules/System/Service.php b/src/bb-modules/System/Service.php index 75f058d72..6d1ad745b 100644 --- a/src/bb-modules/System/Service.php +++ b/src/bb-modules/System/Service.php @@ -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;