diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-17 13:30:06 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-17 13:30:06 -0800 |
commit | f70130b820b48769c5d2182ed0c8b503daccb562 (patch) | |
tree | 4ac74fc1d950536760417fd1a22b86b83068030a /modules | |
parent | f0a290fc7617f62e7e53bd4659f541a9c340ba1c (diff) |
Special case output for ORM_Validation_Exceptions
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery_unit_test/controllers/gallery_unit_test.php | 6 |
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"; |