title: Unit testing whether an exception has been caught
body: <p>I have a method that needs a try/catch around it. This is because the method is called from a <code>Task</code>. If an exception is thrown the thread will end. I could use <code>Task.ContinueWith</code> to handle errors and then fire up a new task if an error occurs but a try/catch will do the trick.</p>
  
  <p>Anyhow, I know I need to put a try/catch in but how do I test that the exception is caught? </p>
  
  <p>One way I can do it is raise an existing event which accepts a string parameter and then in the unit test, test that this string matches a string I expect. Not sure if that's good or not but wondered what the best way to handle this scenario is.</p>