mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
Avoid errors by explicitely namespacing root exception
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user