title: How to catch a global error with NodeJS
body: <p>I am getting an unhandled error but not sure where it's coming from. My app has several http.request(options, callback).end() in different methods, with the callback's trapping "uncaughtException" and "error". I'd like to know which of my methods initiated this issue. Below is the error I get. It is random. Any ideas how to track this down? I was hoping for some global way of trapping unhandled errors.</p>
  
  <pre><code>events.js:85
        throw er; // Unhandled 'error' event
              ^
  Error: read ECONNRESET
      at exports._errnoException (util.js:746:11)
      at TCP.onread (net.js:559:26)
  </code></pre>