R#4 - Ignoring second Catch statement

In this code:
 
      try
       {
         context.Server.Transfer(url);
       }
      catch (ThreadAbortException)
       {
        //ignore the problem
      }
       catch (Exception)
       {
        throw; //all others
      }
 
The second catch statement is greyed out and the tooltip says "Catch clause is redundent"
 
Glen
]]>

1 comment
Comment actions Permalink

ReSharper is right. It is definitely redundant

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
In this code:
 
      try
       {
         context.Server.Transfer(url);
       }
      catch (ThreadAbortException)
       {
        //ignore the problem
      }
       catch (Exception)
       {
        throw; //all others
      }
 
The second catch statement is greyed out and the tooltip says "Catch clause is redundent"
 
Glen
]]>

0

Please sign in to leave a comment.