Skip to content

Fix promise unwrapping in tutorial #172

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

Merged
merged 1 commit into from
Jan 22, 2017
Merged

Fix promise unwrapping in tutorial #172

merged 1 commit into from
Jan 22, 2017

Conversation

sagikazarmark
Copy link
Member

Closes #171

@@ -119,8 +119,8 @@ Using the promise directly
If you don't want to use the callback system, you can also get the state of the promise with ``$promise->getState()``
will return of one ``Promise::PENDING``, ``Promise::FULFILLED`` or ``Promise::REJECTED``.

Then you can get the response of the promise if it's in ``FULFILLED`` state with ``$promise->getResponse()`` call or
get the error of the promise if it's in ``REJECTED`` state with ``$promise->getRequest()`` call
Then you can get the response of the promise if it's in ``FULFILLED`` state or get the error of the promise if it's in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we return the exception or throw it? i would say exception not error, and if we throw say trigger instead of get

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, done.

@dbu dbu merged commit 083ccf6 into master Jan 22, 2017
@dbu dbu removed the in progress label Jan 22, 2017
@dbu dbu deleted the promise_fixes branch January 22, 2017 09:06
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.

2 participants