
JSJ 471: Things Every JavaScript Developer Must Know - Part 3
JavaScript Jabber
00:00
Using Async-Wake to Write Cleaner Code
Many developers just are afraid of exceptions, don't get exception handling properly. When you have do error handling as return values, then your code needs to be full of checks for return values that indicate problems. Just don't think about the errors at all. If you got invalid value, just throw. And then put the catch just where you have sufficient context to do something with it. It's funny, but for me, I use exception handling so that I can actually do kind of the inverse of what you just described. But if you're writing a Parser and there's like an 11 million conditions that if it's not exactly right, or if the string isn't as long as it
Play episode from 41:11
Transcript


