Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document exception concept #7

Closed
dbu opened this issue Sep 21, 2015 · 3 comments
Closed

document exception concept #7

dbu opened this issue Sep 21, 2015 · 3 comments
Assignees
Milestone

Comments

@dbu
Copy link
Contributor

dbu commented Sep 21, 2015

most important is explaining in what situation which exception will be thrown and that everything ever thrown implements Http\Client\Exception.

Hierarchy is the following

\InvalidArgumentException
`- \Http\Client\Exception\InvalidArgumentException (implements \Http\Client\Exception)

\RuntimeException
`- \Http\Client\Exception\RuntimeException (implements \Http\Client\Exception)
   `- \Http\Client\Exception\TransferException
      |- \Http\Client\Exception\BatchException
      `- \Http\Client\Exception\RequestException
         |- \Http\Client\Exception\NetworkException
         `- \Http\Client\Exception\HttpException
            |- \Http\Client\Exception\ServerException
            `- \Http\Client\Exception\ClientException
@dbu
Copy link
Contributor Author

dbu commented Oct 29, 2015

i guess there are two parts:

  • how to use the HttpClient and its exceptions (including an example in the tutorial, see Finalize tutorial #13)
  • how to write a client / adapter and throw the correct exceptions

@sagikazarmark
Copy link
Member

Agree 👍

@sagikazarmark
Copy link
Member

php-http/httplug#82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants