From dccb2b73ffe205e359eeea57e4c7c52e584eccc5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 30 Jan 2010 16:19:00 -0800 Subject: Dump out validation errors so that we have some extra information in the logs. --- modules/gallery/libraries/MY_Kohana_Exception.php | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3