/**
  * @param string $model
  */
 public function __construct($model)
 {
     $message = sprintf(self::MESSAGE, $model);
     parent::__construct($message, 0, null);
 }
 /**
  * Create a new validation error with an associative array of errors.
  * @param array $errors
  */
 public function __construct(array $errors)
 {
     $this->errors = $errors;
     parent::__construct("Validation error", 0, null);
 }
 /**
  * @param string $criteriaClassName
  */
 public function __construct($criteriaClassName)
 {
     $message = sprintf(self::MESSAGE, $criteriaClassName);
     parent::__construct($message, 0, null);
 }
 /**
  * Same as the default exception constructor except it takes another
  * parameter errors, this is the error returned by the xml parser.
  */
 function __construct($message, $code, $errors, $previous = NULL)
 {
     parent::__construct($message, $code, $previous);
     $this->errors = $errors;
 }