Created
July 8, 2011 18:09
-
-
Save bpierre/1072408 to your computer and use it in GitHub Desktop.
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
Error.prepareStackTrace = function(error, structuredStackTrace) { | |
console.log('ok.'); | |
}; | |
// Simple test, ok | |
try { | |
console.log('simple test\u2026'); | |
i_dont_exist(); | |
} catch(e) { | |
var access_stack = e.stack; | |
} | |
// With vm.Script.runInNewContext(), dont work | |
var Script = require('vm').Script; | |
try { | |
console.log('runInNewContext\u2026'); | |
Script.runInNewContext('i_dont_exist();', {}); | |
} catch(e) { | |
var access_stack = e.stack; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment