summaryrefslogtreecommitdiffstats
path: root/application/controllers/tools.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-03 17:17:27 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-03 23:31:58 +0100
commita842392c30e9ef1d1d2bd9b4eb271c3fd23b853f (patch)
treee63e44bdfef7999105a2a1fb6f95725cde285b5e /application/controllers/tools.php
parent08dbb3590d64a5c1bf8981f275e47aef84acb4e0 (diff)
Use exceptions instead of show_error
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/tools.php')
-rw-r--r--application/controllers/tools.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php
index b80dc5024..8c0785409 100644
--- a/application/controllers/tools.php
+++ b/application/controllers/tools.php
@@ -15,7 +15,7 @@ class Tools extends MY_Controller {
$this->load->model('mfile');
if (!$this->input->is_cli_request()) {
- show_error("This can only be called via CLI");
+ throw new \exceptions\ApiException("api/cli-only", "This can only be called via CLI");
}
}
@@ -39,7 +39,7 @@ class Tools extends MY_Controller {
{
$this->load->library('migration');
if ( ! $this->migration->current()) {
- show_error($this->migration->error_string());
+ throw new \exceptions\ApiException("tools/update_database/migration-error", $this->migration->error_string());
}
}
}