From f70130b820b48769c5d2182ed0c8b503daccb562 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 17 Jan 2010 13:30:06 -0800 Subject: Special case output for ORM_Validation_Exceptions --- modules/gallery_unit_test/controllers/gallery_unit_test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/gallery_unit_test') 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"; -- cgit v1.2.3