Skip to content

Promise catch syntax error #484

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

Closed
eddiezane opened this issue Jun 16, 2016 · 8 comments
Closed

Promise catch syntax error #484

eddiezane opened this issue Jun 16, 2016 · 8 comments

Comments

@eddiezane
Copy link

This is on the develop branch.

screen shot 2016-06-16 at 12 17 09 pm

returnsAPromise()
  .catch(err => {
    console.error(err)
  })
@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

Awesome, thanks the find. I'll look into fixing this shortly!

@eddiezane
Copy link
Author

@amadeus, @bounceme, and @davidchambers - y'all are the best people in the world. Such a stunning display of open source project management 💖 .

@alexlafroscia
Copy link

I was just coming over to this repo to report the same thing! A few more examples in my screenshot:

screen shot 2016-06-16 at 10 02 57 am

It seems like a "regular" function passed to .catch gets thrown off as well.

@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

Yeah it's because catch is getting matched as a catch statement, not as a function call.

@alexlafroscia
Copy link

Totally makes sense, it's tough (and unfortunate) that it's both a keyword and the way to handle Promise errors.

As always, thanks for the hard work and attentive response to issues @amadeus!

@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

I have a fix in #485, perhaps check it out and confirm that it fixes the issue. Also make sure I didn't drastically break something else either xD

@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

Should be fixed in develop

@amadeus amadeus closed this as completed Jun 16, 2016
@alexlafroscia
Copy link

alexlafroscia commented Jun 16, 2016

@amadeus looks good to me! .catch is now un-highlighted when used as a method

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

3 participants