Here’s a little promises quirk that I’ve overlooked for a while. Generally we all write promises like this:
doSomething() .then(doSomethingElse) .then(doSomethingFurther) .catch(handleError);
And we know that any exception raised will skip to the catch handler. Except for the initial
doSomething() call. If an exception is raised here it will be treated like a normal exception and stop executing all the rest of your code. So how do you deal with it?