summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-17 13:30:06 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-17 13:30:06 -0800
commitf70130b820b48769c5d2182ed0c8b503daccb562 (patch)
tree4ac74fc1d950536760417fd1a22b86b83068030a /modules
parentf0a290fc7617f62e7e53bd4659f541a9c340ba1c (diff)
Special case output for ORM_Validation_Exceptions
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery_unit_test/controllers/gallery_unit_test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php
index 498dd756..e05fcbaa 100644
--- a/modules/gallery_unit_test/controllers/gallery_unit_test.php
+++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php
@@ -127,6 +127,12 @@ class Gallery_Unit_Test_Controller extends Controller {
$filter = count($_SERVER["argv"]) > 2 ? $_SERVER["argv"][2] : null;
print new Unit_Test($modules, $filter);
+ } catch (ORM_Validation_Exception $e) {
+ print "Validation Exception: {$e->getMessage()}\n";
+ print $e->getTraceAsString() . "\n";
+ foreach ($e->validation->errors() as $field => $msg) {
+ print "$field: $msg\n";
+ }
} catch (Exception $e) {
print "Exception: {$e->getMessage()}\n";
print $e->getTraceAsString() . "\n";