/**
  * Constructor.
  * @param integer $status CURL status code, such as 404, 500, etc.
  * @param string $message error message
  * @param ACurlResponse $response The CURL response
  * @param integer $code error code
  */
 public function __construct($status, $message = null, $response = null, $code = 0)
 {
     $this->statusCode = $status;
     $this->response = $response;
     $message .= ":\n" . $response->data;
     parent::__construct($message, $code);
 }
 public function __construct($file, $line, $message)
 {
     parent::__construct($message);
     // Replace the information from the throw
     // of this exception with the information
     // from the failed assertion.
     $this->file = $file;
     $this->line = $line;
 }
Exemple #3
0
 /**
  * @param string|array $message simple string or array( "message with {param}", array("param" => "value") ) to use in Yii::t
  * @param int $code
  * @param Exception $previous
  */
 public function __construct($message = "", $code = 0, Exception $previous = null)
 {
     $params = array();
     if (is_array($message)) {
         $params = $message[1];
         $message = $message[0];
     }
     $message = Yii::t('core', $message, $params);
     parent::__construct($message, $code, $previous);
 }
Exemple #4
0
 public function __construct($message, $code)
 {
     if (is_array($message)) {
         $result = '';
         foreach ($message as $m) {
             $result .= implode(';', $m);
         }
         $message = $result;
     }
     parent::__construct($message);
     $this->code = $code;
 }
 /**
  * Конструктор
  * @param string $message Сообщение об ошибке
  * @param integer $code error code
  */
 public function __construct($message = null, $code = 0)
 {
     parent::__construct($message, $code);
 }
 /**
  * Constructor.
  * @param integer $status HTTP status code, such as 404, 500, etc.
  * @param string $message error message
  * @param integer $code error code
  */
 public function __construct($status, $message = null, $code = 0)
 {
     $this->statusCode = $status;
     parent::__construct($message, $code);
 }
 public function __construct($message, $code = 0, $errorInfo = null)
 {
     $this->errorInfo = $errorInfo;
     parent::__construct($message, $code);
 }
 public function __construct($return, $message = null, $code = 0, $previous = null)
 {
     parent::__construct($message, $code, $previous);
     $this->return = $return;
 }
 function __construct($message = 'Not Found')
 {
     parent::__construct($message, 404);
 }
Exemple #10
0
 /**
  * @param     $message
  * @param int $code
  *
  * @return Exception
  */
 public function __construct($message, $code = 0)
 {
     Craft::log($message, LogLevel::Error);
     parent::__construct($message, $code);
 }
Exemple #11
0
 public function __construct($responseCode, $message)
 {
     $this->_responseCode = $responseCode;
     parent::__construct($message);
 }
Exemple #12
0
 /**
  * Sass Exception.
  * @param string Exception message
  * @param array parameters to be applied to the message using <code>strtr</code>.
  * @param object object with source code and meta data
  */
 public function __construct($message, $params, $object)
 {
     parent::__construct(Yii::t('sass', $message, $params) . (is_object($object) ? ": {$object->filename}::{$object->line}\nSource: {$object->source}" : ''));
 }
Exemple #13
0
 /**
  * @param mixed $message error message or a CModel object that has errors
  * @param int    $code Use different codes for different errors
  */
 public function __construct($message, $code = 0)
 {
     if ($code === 0) {
         $code = self::ERR_BUSINESS_EXCEPTION;
     }
     if ($message instanceof CModel) {
         $message = CHtml::errorSummary($message, '');
     }
     // we don't use the code from PHP's Exception object
     parent::__construct($message, CPropertyValue::ensureInteger($code));
     $this->errorCode = $code;
     $this->message = $message;
 }
Exemple #14
0
 /**
  * Initialize the exception, saving the driver that was passed
  *
  * @param string $message
  * @param integer $code
  * @param GeoCode_Driver $driver
  * @return GeoCode_Exception
  */
 public function __construct($message = '', $code = 0, GeoCode_Driver $driver = null)
 {
     $this->driver = $driver;
     parent::__construct($message, $code);
 }
Exemple #15
0
 public function __construct($url)
 {
     parent::__construct();
     $this->url = $url;
 }
 public function __construct($message, $code = -32603, $data = null)
 {
     $this->data = $data;
     parent::__construct($message, $code);
 }