From 1a96ce145cfa529708852a46d4cab3c0d4d1b37e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 20 Jul 2009 20:47:47 -0700 Subject: Don't let the task status message exceed the size of the status column when there's an error. --- modules/gallery/helpers/task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/task.php') diff --git a/modules/gallery/helpers/task.php b/modules/gallery/helpers/task.php index 6a9f63c2..352fe522 100644 --- a/modules/gallery/helpers/task.php +++ b/modules/gallery/helpers/task.php @@ -87,7 +87,7 @@ class task_Core { $task->log($e->__toString()); $task->state = "error"; $task->done = true; - $task->status = $e->getMessage(); + $task->status = substr($e->getMessage(), 0, 255); $task->save(); } -- cgit v1.2.3 From a03b9273b2afc61dfdea43f679e75639238cdcd7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 4 Aug 2009 20:34:46 -0700 Subject: Dump any exceptions into the standard Kohana log as well as the task log for maximum exposure. --- modules/gallery/helpers/task.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gallery/helpers/task.php') diff --git a/modules/gallery/helpers/task.php b/modules/gallery/helpers/task.php index 352fe522..9fa04305 100644 --- a/modules/gallery/helpers/task.php +++ b/modules/gallery/helpers/task.php @@ -84,6 +84,7 @@ class task_Core { } $task->save(); } catch (Exception $e) { + Kohana::log("error", $e->__toString()); $task->log($e->__toString()); $task->state = "error"; $task->done = true; -- cgit v1.2.3