`captureStackTrace()` is a V8 API https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi to make the stack trace. Unfortunately, there's no official specification on stack traces, but at least `captureStackTrace()` is available on NodeJS and Chrome, so it's better than nothing.