1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/Doctrine/Validator/Exception.php

34 lines
806 B
PHP
Raw Normal View History

2006-05-30 12:56:40 +04:00
<?php
2006-05-30 13:12:57 +04:00
Doctrine::autoload('Doctrine_Exception');
2006-05-30 12:56:40 +04:00
class Doctrine_Validator_Exception extends Doctrine_Exception {
/**
* @var Doctrine_Validator $validator
*/
2006-05-30 12:56:40 +04:00
private $validator;
/**
* @param Doctrine_Validator $validator
*/
2006-05-30 12:56:40 +04:00
public function __construct(Doctrine_Validator $validator) {
$this->validator = $validator;
}
/**
* returns the error stack
*
* @return array
*/
2006-05-30 12:56:40 +04:00
public function getErrorStack() {
return $this->validator->getErrorStack();
}
/**
* __toString
*
* @return string
*/
public function __toString() {
$string = "Error stack : ".print_r($this->validator->getErrorStack(), true);
return $string.parent::__toString();
}
2006-05-30 12:56:40 +04:00
}
?>