title: Catching exceptions in console application C#
body: <p>I have a console application written in C#. This application runs as automation to test a web service. 
  Flow:</p>
  
  <ol>
  <li>Log in to network share (impersonate user)</li>
  <li>copy mp3 file to local disc</li>
  <li>convert mp3 to wav</li>
  <li>downsample</li>
  <li>trim wave</li>
  <li>extract some useful data from wav</li>
  <li>send http request</li>
  <li>delete local files</li>
  <li>write out some stuff to tsv</li>
  </ol>
  
  <p>The application will run great for several hours (usually takes about 24 hours to complete the test). but every once and a while I will get this message: "The application  has stopped working. I have been running this is VS 2012 in debug mode so, I can see what line throws any error. problem is, that I have not been able to catch the line (or method) that is throwing the error. I originally thought that the Domain controller was causing this issue due to power settings. </p>
  
  <p>How can I capture exactly what error is bubbling its way up the stack?</p>