Re:You Can Throw() Anything in JavaScript – and Other Async/...
by jitl on Friday April 08, 2022 @09:17AM
(#30956440)
I like to have a stack trace. Please. Just in case you’re using throw for control flow inside an abstraction, if that ever leaks, anyone downstream is going to be in pain trying to figure out what is happening.
You can easily attach whatever interesting values you want to an Error instance, go nuts:
You can easily attach whatever interesting values you want to an Error instance, go nuts: