This is because of async/await and promise. Not a new problem (over five years old from my vantage) and entirely avoidable if you write Node as it was written instead of piling on browser framework 'best practice'.https://twitter.com/garybernhardt/status/1101202093715517441 …
-
-
-
Replying to @rwaldron
Sorry forgot my taking points! all the work tc39 has done is flawlessly executed and any critical ideas are only reflects on my amateur / ignorant perspective
1 reply 0 retweets 1 like -
Replying to @brianleroux
Dude... chill out, I wasn't even thinking about anything TC39 related. I just thought you jumped to a conclusion pretty quickly. I've experienced what Gary described, but in completely different, non-async circumstances :P
1 reply 0 retweets 4 likes -
Replying to @rwaldron
Apologies. This one isn't new to me but alt ways of it happening are. What other circumstances cause error swallowing? (It's the only place I've experienced it amd I have no doubt it happens a lot more the dialects/ecosystem Gary is working in.)
2 replies 0 retweets 1 like -
Replying to @brianleroux @rwaldron
Anytime you throw away the stack or have a handler on something that gets spit out of the platform. So: callbacks, promises, and regular old event handlers, all have this. At least with async/await we have long tracebacks as a potential solution.
2 replies 0 retweets 3 likes -
We actually tried to implement long tracebacks in Node.js for callbacks back in the 0.2 days. Ryan had a branch with a working prototype, but it was plagued with edge cases and perf issues :(
1 reply 0 retweets 2 likes -
We should probably not be recommending stuff until the "amazing feature X that fixes everything" actually ships eh.. just a thought.
1 reply 0 retweets 2 likes -
Replying to @brianleroux @rwaldron
Again, this is the exact same problem callbacks have, except with async/await error propogation is a bit more sane (cause it's mostly language level). The thing that confuses all this was the Promise API error propogation when chaining, which is legit awful. Worst ever.
2 replies 0 retweets 4 likes
So long as all your promises are native (not library) promises, devtools should be able to catch most of the error chains. Goal for Promises async/await was to create a global contract that tools could tier-up understanding of. Happening, albeit unevenly (better in browser).
-
-
Didn't sound like Gary was doing anything approaching browser dev. But then again..I am clearly not in the majority of thinking on how that is best done these days!
1 reply 0 retweets 1 like -
Replying to @brianleroux @slightlylate and
BrendanEich Retweeted Gary Bernhardt
BrendanEich added,
1 reply 0 retweets 2 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.
