コード例 #1
0
 protected function errorResponse(NSH_Exception $nshException)
 {
     $responseObject = $this->nshResponse;
     unset($responseObject['response']);
     $httpStatus = $nshException->getHttpStatusCode();
     $responseObject['status'] = $nshException->getCode();
     $responseObject['message'] = $nshException->getMessage();
     $responseObject['errorDetail'] = $nshException->getErrorDetail();
     $this->response($responseObject, $httpStatus);
 }
コード例 #2
0
 function __construct($errorCode, $errorDetail = '')
 {
     parent::__construct($errorCode, $errorDetail, 404);
 }