title: Suggestions for making a reusable try/catch block in C#?
body: <p>I have a class that has about 20-some methods in it. Each one does some web service message processing. I just had to make a change to it, and realized that every one of these methods has the exact same try/catch around it:</p>
  
  <pre><code>        try
          {
              /* *** actual processing specific to each method goes here *** */
          }
          catch (FaultException&lt;CustomException&gt; cfex)
          {
              // common stuff
          }
          catch (CustomException cfex)
          {
              // common stuff
          }
          catch (Exception ex)
          {
              // common stuff
          }
          finally
          {
              FinalizeServiceCall(wsBus, wsMessage, response, logProps);
          }
  </code></pre>
  
  <p>My question is; instead of having this exact same try/catch block in every method, is there a way to make it common? My thoughts were that .NET has stuff like <code>TransactionScope</code> that somehow detects if an exception occurs when leaving that block. Is there I was I can leverage something like that to make a common try/catch block? Any other ideas?</p>