diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-23 16:23:50 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-23 16:23:50 -0800 |
commit | 8849594aa17768f564e45370a62f01e440570dcf (patch) | |
tree | d457337d7699e3d0683a1b2af40b7615a52da1cc /modules/gallery/helpers/task.php | |
parent | d4308e4d35a585a1ce17e4340894e520268260b7 (diff) | |
parent | a4519c6dce542c533d370c790074e6cc5e81170b (diff) |
Merge branch 'bharat_dev' of git@github.com:/gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/gallery/helpers/task.php')
-rw-r--r-- | modules/gallery/helpers/task.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/helpers/task.php b/modules/gallery/helpers/task.php index 4aa95f33..ad756ecd 100644 --- a/modules/gallery/helpers/task.php +++ b/modules/gallery/helpers/task.php @@ -85,6 +85,13 @@ class task_Core { $task->save(); } catch (Exception $e) { Kohana_Log::add("error", $e->__toString()); + + // Ugh. I hate to use instanceof, But this beats catching the exception separately since + // we mostly want to treat it the same way as all other exceptions + if ($e instanceof ORM_Validation_Exception) { + Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); + } + $task->log($e->__toString()); $task->state = "error"; $task->done = true; |