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

The rejection value must be an Exception #7

Closed
clue opened this issue Jul 2, 2015 · 1 comment · Fixed by #27
Closed

The rejection value must be an Exception #7

clue opened this issue Jul 2, 2015 · 1 comment · Fixed by #27

Comments

@clue
Copy link
Owner

clue commented Jul 2, 2015

The following code is not supported:

$promise = React\Promise\reject(123);

$blocker = new Blocker($loop);

// will fail while trying to `throw 123`
$blocker->await($promise);

At the very least, we should add some documentation.

In the future, we should consider wrapping primitive values in some special Exception sub-class.

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

Successfully merging a pull request may close this issue.

1 participant