示例#1
0
 /**
  * Adds an error to the response
  * @method addError
  * @static
  * @param {Q_Exception|array} $exception Either a Q_Exception or an array of them
  */
 static function addError($exception)
 {
     if (is_array($exception)) {
         self::$errors = array_merge(self::$errors, $exception);
     } else {
         self::$errors[] = $exception;
     }
 }