summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/libraries/MY_Kohana_Exception.php7
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