Skip to content

Commit 7a3a6c3

Browse files
committed
Document exceptions
1 parent 324d829 commit 7a3a6c3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

httplug/exceptions.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Exceptions
2+
==========
3+
4+
HTTPlug defines one Exception interface: ``Http\Client\Exception``. All HTTP
5+
client exceptions must implement this interface.
6+
7+
``HttpClient::sendRequest()`` can throw one of the following exceptions.
8+
9+
================================== ====================== ===================
10+
Exception Thrown when Methods available
11+
================================== ====================== ===================
12+
TransferException ???
13+
└ RequestException the request is invalid ``getRequest()``
14+
|nbsp| |nbsp| └ NetworkException no response received
15+
due to network issues ``getRequest()``
16+
|nbsp| |nbsp| └ HttpException error response ``getRequest()``
17+
``getResponse()``
18+
================================== ====================== ===================
19+
20+
.. |nbsp| unicode:: U+00A0 .. non-breaking space

index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ for discussion around a future HTTP client PSR.
6565

6666
Introduction <httplug/introduction>
6767
Usage <httplug/usage>
68+
Exceptions <httplug/exceptions>
6869
Tutorial <httplug/tutorial>
6970
Migrating <httplug/migrating>
7071

0 commit comments

Comments
 (0)