title: Is there a way to test other assertions inside a test after calling tSQLt.ExpectException?
body: <p>Using tSQLt 1.0.5873.27393, I'm trying to write a tSQLt test for a stored procedure that records errors trapped in a <code>CATCH</code> block to a log table before re-throwing the error to the calling session.</p>
  
  <p>I can successfully test that the error message is re-thrown using <code>tSQLt.ExpectException</code>, but a side effect seems to be that it's not possible to test any other assertions after calling <code>tSQLt.ExpectException</code> - so I am unable to test whether the error has been written to the log table.</p>
  
  <p>The simplest test that I can come up with which demonstrates the problem is:</p>
  
  <pre><code>CREATE PROC MyTests.[test ExpectException]
  AS
  BEGIN
      EXEC tSQLt.ExpectException;
      THROW 50001, 'Error message',1
  
      EXEC tSQLt.AssertEquals 0,1, '0=1'
  END
  GO
  </code></pre>
  
  <p>which produces the following (unexpected) output when executed:</p>
  
  <pre><code>|No|Test Case Name                  |Dur(ms)|Result |
  +--+--------------------------------+-------+-------+
  |1 |[MyTests].[test ExpectException]|      3|Success|
  </code></pre>
  
  <p>Using a profiler trace, I can see that the <code>AssertEquals</code> assertion is never executed, because the error is trapped by a <code>CATCH</code> block inside <code>tSQLt.Private_RunTest</code>. </p>
  
  <p>Because tSQLt uses <code>CATCH</code> to trap errors, I suspect that there's no solution to this problem without a major rewrite of tSQLt - but I ask here just in case others have found a way around the issue.</p>