Avoid errors by explicitely namespacing root exception

This commit is contained in:
Romain Neutron
2014-02-20 11:28:31 +01:00
parent fab9a64ae0
commit 2af21c064c
73 changed files with 164 additions and 164 deletions

View File

@@ -1101,7 +1101,7 @@ class API_V1_adapter extends API_V1_Abstract
$record->set_metadatas($metadatas);
$result->set_datas(array("record_metadatas" => $this->list_record_caption($record->get_caption())));
} catch (Exception $e) {
} catch (\Exception $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('An error occured'));
}
@@ -1147,7 +1147,7 @@ class API_V1_adapter extends API_V1_Abstract
$this->list_record_status($databox, $record->get_status())
)
);
} catch (Exception $e) {
} catch (\Exception $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('An error occured'));
}
@@ -1173,7 +1173,7 @@ class API_V1_adapter extends API_V1_Abstract
$record->move_to_collection($collection, $this->app['phraseanet.appbox']);
$result->set_datas(array("record" => $this->list_record($record)));
} catch (Exception $e) {
} catch (\Exception $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, $e->getMessage());
}
@@ -1197,7 +1197,7 @@ class API_V1_adapter extends API_V1_Abstract
$result->set_datas(array('record' => $this->list_record($record)));
} catch (NotFoundHttpException $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('Record Not Found'));
} catch (Exception $e) {
} catch (\Exception $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('An error occured'));
}
@@ -1221,7 +1221,7 @@ class API_V1_adapter extends API_V1_Abstract
$result->set_datas(array('story' => $this->list_story($story)));
} catch (NotFoundHttpException $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('Story Not Found'));
} catch (Exception $e) {
} catch (\Exception $e) {
$result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, _('An error occured'));
}