Skip to content

Instantly share code, notes, and snippets.

@sam-github sam-github/-
Created Jan 18, 2014

Embed
What would you like to do?
> try{require('/etc/passwd')}catch(e){console.log('e<', e, '>')}
/etc/passwd:1
unction (exports, require, module, __filename, __dirname) { root:x:0:0:root:/r
^
e< [SyntaxError: Unexpected token :] >
undefined
> ^[[A^[[A^[[A
@sam-github

This comment has been minimized.

Copy link
Owner Author

sam-github commented Jan 18, 2014

I'm surprised the syntax error isn't completely encapsulated in the Error object.

Also, the control is me trying to up-arrow, so the console is a bit messed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.