mvc: small update loosely related to #5061

This commit is contained in:
Franco Fichtner 2021-06-22 09:59:20 +02:00
parent 1873189ac8
commit 9e7d8b2ddb

View File

@ -24,7 +24,7 @@ try {
$application = new \Phalcon\Mvc\Application($di);
echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
} catch (Exception $e) {
} catch (\Exception $e) {
$response = array();
$response['errorMessage'] = $e->getMessage();
if (method_exists($e, 'getTitle')) {
@ -36,7 +36,7 @@ try {
header('HTTP', true, 500);
header("Content-Type: application/json;charset=utf-8");
echo json_encode($response, JSON_UNESCAPED_SLASHES);
} catch (ArgumentCountError $e) {
} catch (\ArgumentCountError $e) {
error_log($e);
$response = ['errorMessage' => 'endpoint parameter mismatch', 'errorTitle' => gettext("An API exception occured")];
header('HTTP', true, 500);