Hacker News new | past | comments | ask | show | jobs | submit login

> we cant catch async errors outside the async callback , will generators fix this ?

You can inject an exception into a generator via the throw method[0], and it'll be raised at the yield, as if `yield` had thrown[1].

JS exception handling facilities are still crap, though.

[0] http://wiki.ecmascript.org/doku.php?id=harmony:generators#me...

[1] http://wiki.ecmascript.org/doku.php?id=harmony:generators#in...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: