Skip to content

Instantly share code, notes, and snippets.

@sam-github
Created January 18, 2014 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sam-github/8484653 to your computer and use it in GitHub Desktop.
Save sam-github/8484653 to your computer and use it in GitHub Desktop.
> 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
Copy link
Author

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