title: How to capture no file for fs.readFileSync()?
body: <p>Within node.js <a href="http://nodejs.org/api/fs.html#fs_fs_readfile_filename_encoding_callback">readFile()</a> shows how to capture an error, however there is no comment for the <a href="http://nodejs.org/api/fs.html#fs_fs_readfilesync_filename_encoding">readFileSync()</a> function regarding error handling. As such, if I try to use readFileSync() when there is no file, I get the error <code>Error: ENOENT, no such file or directory</code>.</p>
  
  <p>How do I capture the exception being thrown? The doco doesn't state what exceptions are thrown, so I don't know what exceptions I need to catch. I should note that I don't like generic 'catch every single possible exception' style of try/catch statements. In this case I wish to catch the specific exception that occurs when the file doesn't exist and I attempt to perform the readFileSync.</p>
  
  <p>Please note that I'm performing sync functions only on start up before serving connection attempts, so comments that I shouldn't be using sync functions are not required :-) </p>