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 |