Skip to content

Commit

Permalink
Dump out validation errors so that we have some extra information in …
Browse files Browse the repository at this point in the history
…the logs.
  • Loading branch information
bharat committed Jan 31, 2010
1 parent 10e208e commit dccb2b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gallery/libraries/MY_Kohana_Exception.php
Expand Up @@ -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.