Permalink
Browse files

Dump out validation errors so that we have some extra information in …

…the logs.
  • Loading branch information...
bharat committed Jan 31, 2010
1 parent 10e208e commit dccb2b73ffe205e359eeea57e4c7c52e584eccc5
Showing with 7 additions and 0 deletions.
  1. +7 −0 modules/gallery/libraries/MY_Kohana_Exception.php
@@ -28,4 +28,11 @@ public static function text($e) {
$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);
+ }
}

0 comments on commit dccb2b7

Please sign in to comment.