Esempio n. 1
0
 public function get_response()
 {
     // Lets log the Exception, Just in case it's important!
     Kohana_Exception::log($this);
     $params = array('code' => $this->getCode(), 'message' => rawurlencode($this->getMessage()), 'response' => NULL, 'errors' => $this->_errors);
     try {
         return json_encode($params);
     } catch (Exception $e) {
         return parent::get_response();
     }
 }