コード例 #1
0
 /**
  * 
  * @param unknown $message
  * @param string $previous
  * @param array $errors
  */
 public function __construct($message, $previous = null, array $errors = [])
 {
     parent::__construct($message, 400, $previous, $errors);
 }
コード例 #2
0
 public function __construct()
 {
     parent::__construct("Token is expired or incorrect", 401);
 }
コード例 #3
0
 /**
  * 
  * @param unknown $message
  * @param string $previous
  * @param array $errors
  */
 public function __construct($message = 'Unprocessable Entity', $previous = null, array $errors = [])
 {
     parent::__construct($message, 422, $previous, $errors);
 }
コード例 #4
0
 public function __construct($message = 'Object not found')
 {
     parent::__construct($message, 404);
 }
コード例 #5
0
 public function __construct($status_code)
 {
     parent::__construct("Server error", $status_code);
 }
コード例 #6
0
 /**
  * Creates a new CommunicationException.
  * @param string $message The message returned from QBank.
  * @param int $code The error code returned from QBank.
  * @param string $type The name of the {@link Exception} that occured in QBank while processing the call.
  * @author Björn Hjortsten
  * @return CommunicationException
  */
 public function __construct($message = null, $code = 0, $type = 'Exception')
 {
     $this->type = $type;
     parent::__construct($message, $code);
 }