示例#1
0
 public function __construct($errors, $message = NULL, $variables = NULL, $errno = NULL, array $debug = NULL, Exception $previous = NULL)
 {
     if (class_exists('ORM_Validation_Exception') && $errors instanceof ORM_Validation_Exception) {
         $errors = $errors->errors('model');
     } elseif ($errors instanceof RestfulAPI_Validation) {
         $errors = $errors->errors();
     } elseif ($errors instanceof Validation) {
         $errors = $errors->errors('validation');
     }
     $this->_errors = Kohana_Arr::flatten($errors);
     parent::__construct(422, $message, $variables, $errno, $debug, $previous);
 }
示例#2
0
 public function __construct($message = NULL, array $variables = NULL, $errno = NULL, array $debug = NULL, Exception $previous = NULL)
 {
     parent::__construct(403, $message, $variables, $errno, $debug, $previous);
 }