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

Use native PHP Exception Code to transmit HTTP response code #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romaninsh
Copy link

As per PHP manual, Exceptions supports specifying error codes through
2nd argument of constructor:
http://www.php.net/manual/en/exception.getcode.php

This patch makes use of standard PHP functionality to transmit error
codes. This adds support for un-handled response types such as 402, 420
and others.

As per PHP manual, Exceptions supports specifying error codes through
2nd argument of constructor:
http://www.php.net/manual/en/exception.getcode.php

This patch makes use of standard PHP functionality to transmit error
codes. This adds support for un-handled response types such as 402, 420
and others.
@zuk
Copy link
Member

zuk commented Oct 9, 2014

Can anyone think of a reason why this shouldn't be merged? I haven't written a line of PHP in about two years so not the best person to make the call on this, but I can imagine it being useful.

@skondakov
Copy link

Seems pretty straightforward to me.

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

Successfully merging this pull request may close these issues.

4 participants