예제 #1
0
 /**
  * Adds Exception to exceptions array. The catchException() method
  * calls this method for any non-fatal exception. The array of
  * collected exceptions is later passed to the view so it can still
  * display them.
  *
  * Exceptions are added to the array $this->exceptions.
  *
  * @param $e api_exception: Thrown exception
  * @param $prms array: Additional params passed to catchException()
  */
 private function aggregateException(api_exception $e, array $prms)
 {
     if (!empty($prms)) {
         foreach ($prms as $n => $v) {
             if (!empty($v)) {
                 $e->setParam($n, $v);
             }
         }
     }
     array_push($this->exceptions, $e);
 }