title: "Catch" unit testing framework - REQUIRE_THROWS_AS
body: <p>I started to use "Catch" unit testing framework and so far it's really great. I have used VS built in unit testing framwork with great pain . </p>
  
  <p>one thing I have noticed that the macro <code>REQUIRE_THROWS_AS</code> does not behave as one would expect</p>
  
  <p>from the docs:</p>
  
  <blockquote>
  <pre><code>REQUIRE_THROWS_AS( expression, exception type ) and
  CHECK_THROWS_AS( expression, exception type )
  </code></pre>
    
    <p>Expects that an exception of the specified type is thrown during
    evaluation of the expression.</p>
  </blockquote>
  
  <p>when I try to write</p>
  
  <pre><code>TEST_CASE("some test") {
      SECTION("vector throws") {
          std::vector&lt;int&gt; vec;
          REQUIRE_THROWS_AS(vec.at(10), std::logic_error);
      }
  }
  </code></pre>
  
  <p>I expect the test to fail and yet it says the test passed. is there a bug in the framework or I am wrong?</p>