From dfbf75b5964603d3c5617ea41dd422f60f25d093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1gi-Kaz=C3=A1r=20M=C3=A1rk?= Date: Mon, 14 Dec 2015 15:20:45 +0100 Subject: [PATCH] Add exception explanation, fixes #87 Add missing trailing dot Add better explanation for workflow exceptions in Async Client Use FQCN to avoid confusion --- src/HttpAsyncClient.php | 4 ++++ src/HttpClient.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/HttpAsyncClient.php b/src/HttpAsyncClient.php index f426979..592fd49 100644 --- a/src/HttpAsyncClient.php +++ b/src/HttpAsyncClient.php @@ -15,9 +15,13 @@ interface HttpAsyncClient /** * Sends a PSR-7 request in an asynchronous way. * + * Exceptions related to processing the request are available from the returned Promise. + * * @param RequestInterface $request * * @return Promise + * + * @throws \Exception If processing the request is impossible (eg. bad configuration). */ public function sendAsyncRequest(RequestInterface $request); } diff --git a/src/HttpClient.php b/src/HttpClient.php index fa66c2c..0e51749 100644 --- a/src/HttpClient.php +++ b/src/HttpClient.php @@ -21,7 +21,8 @@ interface HttpClient * * @return ResponseInterface * - * @throws Exception + * @throws \Http\Client\Exception If an error happens during processing the request. + * @throws \Exception If processing the request is impossible (eg. bad configuration). */ public function sendRequest(RequestInterface $request); }