Show
Ignore:
Timestamp:
12/17/08 16:59:39 (15 months ago)
Author:
jwage
Message:

[1.0, 1.1] Improving error message when validation fails. (closes #1763)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Validator/Exception.php

    r5132 r5300  
    6363 
    6464    /** 
    65      * __toString 
    66      * 
    67      * @return string 
    68      */ 
    69     public function __toString() 
    70     { 
    71  
    72         return parent::__toString(); 
    73     } 
    74  
    75     /** 
    7665     * Generate a message with all classes that have exceptions 
    7766     */ 
    7867    private function generateMessage() 
    7968    { 
    80         $message = ""; 
     69        $message = ''; 
    8170        foreach ($this->invalid as $record) { 
    82            $message .= "Validation error in class " . get_class($record) . " "; 
     71            $message .= $record->getErrorStackAsString(); 
    8372        } 
    8473        return $message;