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

Catch \Throwable instead of \Exception in PHP7 #49

Closed
joshdifabio opened this issue Feb 29, 2016 · 0 comments
Closed

Catch \Throwable instead of \Exception in PHP7 #49

joshdifabio opened this issue Feb 29, 2016 · 0 comments

Comments

@joshdifabio
Copy link
Contributor

Type errors are not caught by the React Promise implementation in PHP7. It's fairly trivial to implement catch-all for PHP7 and PHP5 without breaking BC.

try {
  // call a success/error/progress handler
} catch (\Throwable $e) {
  // handle $e
} catch (\Exception $e) {
  // handle $e
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants