application/modules/g/controllers/RestController.php
protected function _respondToError($errorMessage, $httpCode) {
        $this->_setHttpStatusCode($httpCode);
        $this->view->result = array(
            'success' => false,
            'errorMessage' => $errorMessage
        );
    }
protected function _respondToError($errorMessage, $httpCode) {
        $this->_setHttpStatusCode($httpCode);
        $this->view->result = array(
            'success' => false,
            'errorMessage' => $errorMessage
        );
    }
protected function _respondToError ( $ errorMessage , $ httpCode ) { $ this -> _setHttpStatusCode ( $ httpCode ) ; $ this -> view -> result = array ( 'success' => false , 'errorMessage' => $ errorMessage ) ; }
Format a response object for the view, and set the right error code

@param string $errorMessage
@param int $httpCode
@return void
Format a response object for the view and set the right error code