Replying to @coderbyheart

You can throw undefined, btw.

I personally think you should always throw an Error instance. Technically this
is superfluous, since everywhere you catch it, you know you have an error.

But: Errors have attached stack traces. So it's easier to debug.

Wed, 10 Jan 2018 14:27:49 UTC1