handleError() public method

Handle an error - set the resulting error document to the response object
public handleError ( Exception $e, integer $defaultResponseCode = 500, DrestCommon\Error\Response\ResponseInterface $errorDocument = null ) : DrestCommon\ResultSet
$e Exception
$defaultResponseCode integer the default response code to use if no match on exception type occurs
$errorDocument DrestCommon\Error\Response\ResponseInterface
return DrestCommon\ResultSet the error result set
示例#1
0
 /**
  * Handle an error - set the resulting error document to the response object
  * @param  \Exception        $e
  * @param  integer           $defaultResponseCode the default response code to use if no match on exception type occurs
  * @param  ResponseInterface $errorDocument
  * @return ResultSet         the error result set
  */
 public function handleError(\Exception $e, $defaultResponseCode = 500, ResponseInterface $errorDocument = null)
 {
     return $this->service->handleError($e, $defaultResponseCode, $errorDocument);
 }