title: C# - using return in catch clause
body: <p>I saw a similar question here, but there are still some things I don't understand. As far as I know when you use <code>try-catch</code> block, if an exception is thrown the catch block will be executed right after and no code after the <code>catch</code> clause in the same code block will be executed. So if I get it right if we have:</p>
  
  <pre><code>try
  {
      // do something
      // throw an exception for some reason
  }
  catch (Exceptiox ex)
  {
      // do something when there is and exception thrown
  }
  // some code that will never be runned if and exception was thrown above
  </code></pre>
  
  <p>I'm not 100% sure that the <code>catch</code> stops further execution outside its scope but this is one of my questions so correct me if I'm wrong.</p>
  
  <p>So what's the point of using <code>return</code> in a <code>catch</code> block if you don't need to return any value at all? I see this in some methods from inherited code I'm working on. For example:</p>
  
  <pre><code>public void DeleteImage(AppConfig imageInfo, string imageName)
  {
      string imgPath = imageInfo.ConfigValue.ToString();
      try
      {
          File.Delete(imgPath + "\\" + imageName);
      }
      catch (Exception ex)
      {
          logger.Error(ex.ToString());
          return;
      }
  }
  </code></pre>
  
  <p>Here there is no need to do anything besides logging the error. Why then use <code>return</code>. Is it a mistake? Won't the method finish if you don't <code>return</code> explicitly? If there was more code after the <code>catch</code> clause would it be executed if the <code>return</code> wasn't there and the <code>catch</code> was used only for logging the error?</p>