2 ms·
>I don't care about awkward .then() syntax. I don't mind automatic error propagation. I don't care having to call .done() on a promise chain. I don't care about
by coldtea 11y ago
>I don't care about awkward .then() syntax. I don't mind automatic error propagation. I don't care having to call .done() on a promise chain. I don't care about losing the stack (which is inherent in any async work). I care that promises grab all errors, just like try/catch.
You should stop caring about that and start caring about the other stuff.
"Breakpoint on exception" still works, albeit slightly altered, and in any way it's a minor detail compared to the far better mental model for code execution that async and promises bring.
>I want to make stupid typo errors and have them appear as normal errors, not caught by promises.
For stupid typo errors use a linter and/or a transpiler like babel in the first place.
>It's cool, I just don't understand why everyone is so excited about a simple syntactic improvement.
Because better syntax brings code closer to how we think, and reduces errors.