view source
Creating Custom Error Objects In Node.js With Error.captureStackTrace()
Coming from the world of ColdFusion, I'm used to using the CFThrow tag (and throw() function), which allows me to throw error objects with a good deal of contextual information that can later be used for debugging purposes. As such, I wanted to see if I could create a custom Error class in my Node.js code that would mimic [some of] the properties available on the ColdFusion error object.
Advertisement