예제 #1
0
 /**
  * Constructor.
  *
  * @param $msg string: User message.
  */
 public function __construct($msg = 'No View Found!')
 {
     parent::__construct();
     $this->setMessage($msg);
     $this->setSeverity(api_exception::THROW_FATAL);
 }
예제 #2
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);
 }
예제 #3
0
 public function __construct($msg = "Action not found")
 {
     parent::__construct();
     $this->setMessage($msg);
     $this->setSeverity(api_exception::THROW_FATAL);
 }
예제 #4
0
 public function __construct($code, $message)
 {
     parent::__construct(self::THROW_FATAL, array(), $code, $message);
 }