Created
November 1, 2016 23:24
-
-
Save boutell/8f312128d068240cc334fdd77985bce9 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
// test1.js | |
var from = './test2.js'; | |
try { | |
require(from); | |
} catch (e) { | |
console.log(e); | |
} | |
// test2.js | |
bad syntax o noes | |
// Output | |
[SyntaxError: Unexpected identifier] | |
// How do I get the line number and filename in this situation? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment