summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-06-04 22:09:05 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-06-04 22:09:05 +0200
commit048410164d2a17bbb588e43351e44eeb81610960 (patch)
tree0331c096d68d78496342accbd92b341113fe72b3 /application/controllers
parent8b3525c2b79f74089b623ca6870ddb9b06270e5d (diff)
Refactor exception handling into dedicated class
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/api.php2
-rw-r--r--application/controllers/tools.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/application/controllers/api.php b/application/controllers/api.php
index 644a726e7..9540f1ff7 100644
--- a/application/controllers/api.php
+++ b/application/controllers/api.php
@@ -59,7 +59,7 @@ class Api extends MY_Controller {
} catch (\exceptions\PublicApiException $e) {
return send_json_error_reply($e->get_error_id(), $e->getMessage(), $e->get_data());
} catch (\Exception $e) {
- _log_exception($e);
+ \libraries\ExceptionHandler::log_exception($e);
return send_json_error_reply("internal-error", "An unhandled internal server error occured");
}
}
diff --git a/application/controllers/tools.php b/application/controllers/tools.php
index f2fa1f97c..f0d8ce6f9 100644
--- a/application/controllers/tools.php
+++ b/application/controllers/tools.php
@@ -89,7 +89,7 @@ class Tools extends MY_Controller {
$test->cleanup();
} catch (\Exception $e) {
echo "not ok - uncaught exception in {$testcase}->{$method->name}\n";
- _actual_exception_handler($e);
+ \libraries\ExceptionHandler::exception_handler($e);
$exitcode = 255;
}
}