diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-13 01:21:09 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-13 01:21:09 +0000 |
commit | 238cb7ff6e7469ce6fc479766f4199e39fc8193f (patch) | |
tree | 617d41580647a482305b00ae10d12ed11019679c /core | |
parent | 4093315390c04836d386bfd16881fd40dc199000 (diff) |
Log the complete exception information for exceptions that happen in tasks so that we have some clue as to what went wrong
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/admin_maintenance.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/controllers/admin_maintenance.php b/core/controllers/admin_maintenance.php index 6eaad7e0..a7161302 100644 --- a/core/controllers/admin_maintenance.php +++ b/core/controllers/admin_maintenance.php @@ -136,7 +136,16 @@ class Admin_Maintenance_Controller extends Admin_Controller { public function run($task_id) { access::verify_csrf(); - $task = task::run($task_id); + try { + $task = task::run($task_id); + } catch (Exception $e) { + Kohana::log( + "error", + sprintf( + "%s in %s at line %s:\n%s", $e->getMessage(), $e->getFile(), + $e->getLine(), $e->getTraceAsString())); + throw $e; + } if ($task->done) { switch ($task->state) { |