public function execute() { $this->_response_method = \Wave\Exception::getResponseMethod(); $this->error['code'] = $this->_data['exception']->getCode(); $this->error['message'] = $this->_data['exception']->getMessage(); if ($this->error['code'] == 0) { $this->_status = \Wave\Response::STATUS_EXCEPTION; } else { $this->_status = $this->error['code']; } return $this->respond(); }
public function __construct($message, $code = null) { if ($code == null && is_numeric($message)) { $code = intval($message); $message = $this->getInternalMessage($code); } parent::__construct($message, $code); }
public function __construct($message, Request $request = null, Response $response = null) { $this->request = $request; $this->response = $response; parent::__construct($message, $this->getStatusCode()); }