title: unit testing an unexcpected exception?
body: <p>Is it possible to mock or unit test for an unexpected exception? Code coverage is complaining that the catch is not being tested for, but how do you test it? </p>
  
  <pre><code>    public List&lt;Blog&gt; SelectActiveBlogs()
      {
          List&lt;Blog&gt; returnCode = null;
  
          try
          {
              returnCode = GetQueryable&lt;Blog&gt;().Where(b =&gt; b.IsActive).ToList();
          }
          catch (Exception ex)
          {
              ExceptionHandler.HandleException(ex);
          }
  
          return returnCode;
      }
  </code></pre>
  
  <p><strong>EDIT:</strong> The GetQueryable is a method that uses a repository factory to get a db result, so there could be exceptions bubbling up from db interactions in production, so I want to make sure we catch them if something goes wrong an thus the catch block is present.</p>
  
  <p><strong>EDIT2:</strong> The exception is actually handled by a custom class to preserve the stack trace, once logged it's not re thrown. Question still remains as to whether I can mock and throw an exception in this case.</p>