diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-30 16:19:00 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-30 16:19:00 -0800 |
commit | dccb2b73ffe205e359eeea57e4c7c52e584eccc5 (patch) | |
tree | 6a6ba2c4d8a33a72e2ec57a8ec8c5b0ecfc7fb33 /modules/gallery/libraries | |
parent | 10e208ea5c1a98d509a520a5bd2cbd407ae2268a (diff) |
Dump out validation errors so that we have some extra information in the logs.
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r-- | modules/gallery/libraries/MY_Kohana_Exception.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/libraries/MY_Kohana_Exception.php b/modules/gallery/libraries/MY_Kohana_Exception.php index dd5998a1..1c40091a 100644 --- a/modules/gallery/libraries/MY_Kohana_Exception.php +++ b/modules/gallery/libraries/MY_Kohana_Exception.php @@ -28,4 +28,11 @@ class Kohana_Exception extends Kohana_Exception_Core { $e->getFile(), $e->getLine(), $e->getTraceAsString()); } + + public static function handle(Exception $e) { + if ($e instanceof ORM_Validation_Exception) { + Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); + } + return parent::handle($e); + } }
\ No newline at end of file |