public function __construct($msg, $nameClass, $nameMethod)
 {
     if (is_string($msg) && strlen(trim($msg)) == 0) {
         $msg = 'Непредвиденная ошибка';
     }
     parent::__construct($msg, 65030, $nameClass, $nameMethod);
 }
Esempio n. 2
0
 public function __construct($statusCode, $message = "", $code = 0, Exception $previous = NULL)
 {
     if (is_numeric($statusCode)) {
         $this->statusCode = $statusCode;
     } else {
         // Force-cast to string message
         $message = @"{$statusCode}";
     }
     // TODO: Use `Resource` class to get a predefined locale-based message.
     parent::__construct($message, $code, $previous);
 }
Esempio n. 3
0
 /**
  *  create instance
  *     
  *  @param  integer $code the status code
  *  @param  string  $msg  the actual exception message
  *  @param  string  $status_msg if you want to override the defualt status message   
  */
 public function __construct($code, $msg = '', $status_msg = '')
 {
     parent::__construct($msg, $code);
     if (empty($status_msg)) {
         if (isset($this->code_map[$code])) {
             $this->status_msg = $this->code_map[$code];
         } else {
             $this->status_msg = 'Unknown Status Code';
         }
         //if/else
     } else {
         $this->status_msg = $status_msg;
     }
     //if/else
 }
 public function __construct($msg, $nameClass, $nameMethod)
 {
     parent::__construct($msg, 65007, $nameClass, $nameMethod);
 }
 public function __construct($msg, $nameClass, $nameMethod, $toDo)
 {
     $this->toDo = $toDo;
     parent::__construct($msg, 65006, $nameClass, $nameMethod);
 }
Esempio n. 6
0
 /**
  *  create instance
  *  
  *  @since  11-7-11   
  *  @param  mixed $controller_response  same value a Controller would return
  *  @param  string  $msg  the message
  *  @param  interger  $code      
  */
 public function __construct($controller_response = null, $msg = '', $code = 0)
 {
     parent::__construct($msg, $code);
     $this->controller_response = $controller_response;
 }
Esempio n. 7
0
 /**
  * @param Exception $e
  */
 public function __construct(Exception $e)
 {
     $message = $this->formatMessage($e);
     parent::__construct($message);
 }
 /**
  *  create this object
  *  
  *  @param  string  $path a request path, something like: controller/method/arg1/arg2/...
  */
 public function __construct($path)
 {
     $this->path = $path;
     parent::__construct($path);
 }
 public function __construct($msg, $nameClass, $nameMethod, $nameArg)
 {
     $this->nameArg = $nameArg;
     parent::__construct($msg, 65001, $nameClass, $nameMethod);
 }