Created
September 15, 2014 07:18
-
-
Save AdamMadrzejewski/d52a3ffd811f3c01e243 to your computer and use it in GitHub Desktop.
Force Stack Traces with JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The magic | |
console.log(new Error().stack); | |
/* SAMPLE: | |
Error | |
at Object.module.exports.request (/home/vagrant/src/kumascript/lib/kumascript/caching.js:366:17) | |
at attempt (/home/vagrant/src/kumascript/lib/kumascript/loaders.js:180:24) | |
at ks_utils.Class.get (/home/vagrant/src/kumascript/lib/kumascript/loaders.js:194:9) | |
at /home/vagrant/src/kumascript/lib/kumascript/macros.js:282:24 | |
at /home/vagrant/src/kumascript/node_modules/async/lib/async.js:118:13 | |
at Array.forEach (native) | |
at _each (/home/vagrant/src/kumascript/node_modules/async/lib/async.js:39:24) | |
at Object.async.each (/home/vagrant/src/kumascript/node_modules/async/lib/async.js:117:9) | |
at ks_utils.Class.reloadTemplates (/home/vagrant/src/kumascript/lib/kumascript/macros.js:281:19) | |
at ks_utils.Class.process (/home/vagrant/src/kumascript/lib/kumascript/macros.js:217:15) | |
*/ | |
//use console.trace() (when available) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment