title: I need a way to wrap all my methods inside try catch
body: <p>If there exists a way with which I could wrap all my methods inside try catch without writing try catch in every method.</p>
  
  <p>Currently we are using the below mentioned approach:</p>
  
  <pre><code>public TValue ErrorHandler&lt;TValue&gt;(Func&lt;TValue&gt; action)
      {
          try
          {
              return (TValue)action();
          }
          catch (Exception ex)
          {
              //Handle Exception and Log it..........
              return default(TValue);
          }
      }
  
      public void ErrorHandler(Action action)
      {
          try
          {
              action();
          }
          catch (Exception ex)
          {
              //Handle Exception and Log it..........
          }
      }
  </code></pre>
  
  <p>and this is used as:</p>
  
  <pre><code>public void ClearControls()
      {
          this.ErrorHandler(() =&gt;
          {
                 //................................
          });
      } 
  </code></pre>
  
  <p>Since this uses Lambda in it, it forces to run the application again if the code is edited while debugging.</p>
  
  <p>Please let me know any other possible solution where I could implement Try Catch in all methods and debug my code without any pain.</p>