コード例 #1
0
ファイル: NoViewFound.php プロジェクト: jonolsson/Saturday
 /**
  * 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
ファイル: NoActionFound.php プロジェクト: jonolsson/Saturday
 public function __construct($msg = "Action not found")
 {
     parent::__construct();
     $this->setMessage($msg);
     $this->setSeverity(api_exception::THROW_FATAL);
 }
コード例 #4
0
ファイル: httpclient.php プロジェクト: pneff/binarypool
 public function __construct($code, $message)
 {
     parent::__construct(self::THROW_FATAL, array(), $code, $message);
 }