From 73a1bcf3d616fd12161696181642aa0561f97287 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 17 Aug 2016 13:58:55 +0200 Subject: [PATCH] [Bridge] Add specialized error handling functions --- lib/Bridge.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Bridge.php b/lib/Bridge.php index b943158..69880bb 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -30,6 +30,14 @@ abstract class BridgeAbstract implements BridgeInterface{ throw new \HttpException($message, $code); } + protected function returnClientError($message){ + $this->returnError($message, 400); + } + + protected function returnServerError($message){ + $this->returnError($message, 500); + } + /** * Return datas stored in the bridge * @return mixed