Created
May 21, 2014 03:22
-
-
Save euank/46d068f4315693f71f04 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var fs = require('fs'); | |
| try { | |
| fs.readFile('/tmp/kek.not-json', function(err, data) { | |
| JSON.parse(data);/* exception, uncaught */ | |
| }) | |
| } catch(ex) { | |
| console.log("I don't print. It instead errors out with an exception"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment