Add special output support for ORM_Validation_Exception

This commit is contained in:
Bharat Mediratta
2010-01-17 18:09:31 -08:00
parent 5162e35d49
commit 3ef22d9d1a

View File

@@ -57,6 +57,12 @@ foreach ($results as $class => $methods) {
if ($result->getMessage()) {
echo " ", $result->getMessage(), "\n";
}
if ($result instanceof ORM_Validation_Exception) {
echo " Validation errors:\n";
foreach ($result->validation->errors() as $key => $value) {
echo " $key: $value\n";
}
}
echo " ", $result->getFile(), " (Line ", $result->getLine(), ")\n";
echo "\n";
echo $result->getTraceAsString(), "\n";