From 238cb7ff6e7469ce6fc479766f4199e39fc8193f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 13 May 2009 01:21:09 +0000 Subject: Log the complete exception information for exceptions that happen in tasks so that we have some clue as to what went wrong --- core/controllers/admin_maintenance.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/controllers') 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) { -- cgit v1.2.3