title: Extension method to throw new Exception
body: <p>I want to write an extension method to throw new exceptions more naturally (Generally curious as to how the keyword 'throw' actually works). I want to know why the following code does not work:</p>
  
  <pre><code>    public static bool Foo() {
          bool bar = false;
          try {
              var zero = 0;
              // force exception
              var result = 1 / zero;
              return bar;
          } catch (Exception ex) {
              ex.ThrowNew("Failed to return Bar");
              // instead of throw new Exception("Failed to return Bar", ex);
          }
      }
  </code></pre>
  
  <p>with the ex.ThrowNew method being the following Extension method:</p>
  
  <pre><code>    public static void ThrowNew(this Exception ex, string message) {
          throw new Exception(message, ex);
      }
  </code></pre>
  
  <p>Obviously the Foo() method works properly when the throwing of the exception is in the catch, and not the extension method as it stops execution of the method when its thrown. </p>
  
  <p><strong>Edit:</strong>
  The application wont compile as the the method does not all the code paths return a valid result (as the exception will be thrown in the Extension method, not the original method)</p>