summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-03 11:14:29 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-03 11:14:29 +0100
commit9ea78213f8e505b5fde7372106adc1947d1f7de2 (patch)
tree278d5c4faba72d05c6a2468a37cdc1d3528a66fd /application
parent6816970229c6d0bd46ba46ecd70199c0687952da (diff)
Improve general exception handling
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/controllers/api.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/application/controllers/api.php b/application/controllers/api.php
index dc31f47d2..3297f0614 100644
--- a/application/controllers/api.php
+++ b/application/controllers/api.php
@@ -51,6 +51,9 @@ class Api extends MY_Controller {
return send_json_reply($c->$function());
} catch (\exceptions\PublicApiException $e) {
return send_json_error_reply($e->get_error_id(), $e->getMessage(), $e->get_data());
+ } catch (\Exception $e) {
+ _log_exception($e);
+ return send_json_error_reply("internal-error", "An unhandled internal server error occured");
}
}
}