title: Log caught exceptions from outside the method in which they were caught
body: <p>I have a method like:</p>
  
  <pre><code>public TResult DoSomethingWithLogging&lt;TResult&gt;(Func&lt;TResult&gt; someAction)
  {
      try
      {
          return someAction.Invoke();
      }
      catch (Exception ex)
      {
          LogException(ex)
          throw;
      }
  </code></pre>
  
  <p>This method is used as follows:</p>
  
  <pre><code>var result = DoSomethingWithLogging(() =&gt; Foo());
  </code></pre>
  
  <p>I also want to log exceptions that were caught inside <code>Foo()</code>. I cannot use <code>throw</code> in <code>catch</code> inside of <code>Foo</code>.</p>
  
  <p>How can I catch such exceptions?</p>
  
  <p>Example: </p>
  
  <pre><code>public static string Foo()
  {
      try
      {
          return "Foo";
      }
      catch (Exception)
      {
          // I have to log this exception too without adding anything to Foo
          return "Exception caught";            
      }       
  }
  </code></pre>