Author: spouliot
Date: 2008-02-16 16:05:26 -0500 (Sat, 16 Feb 2008)
New Revision: 95924

Modified:
   trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/ChangeLog
   
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/DontSwallowErrorsCatchingNonspecificExceptionsRule.cs
Log:
2008-02-16  Sebastien Pouliot  <[EMAIL PROTECTED]> 

        * DontSwallowErrorsCatchingNonspecificExceptionsRule.cs: Rename
        parameter to match interface parameter name.



Modified: trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/ChangeLog
===================================================================
--- trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/ChangeLog 
2008-02-16 21:04:31 UTC (rev 95923)
+++ trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/ChangeLog 
2008-02-16 21:05:26 UTC (rev 95924)
@@ -1,3 +1,8 @@
+2008-02-16  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+
+       * DontSwallowErrorsCatchingNonspecificExceptionsRule.cs: Rename
+       parameter to match interface parameter name.
+
 2008-02-15  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * DoNotDestroyStackTraceRule.cs: (renamed from DontDestroyStackTrace.cs)

Modified: 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/DontSwallowErrorsCatchingNonspecificExceptionsRule.cs
===================================================================
--- 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/DontSwallowErrorsCatchingNonspecificExceptionsRule.cs
     2008-02-16 21:04:31 UTC (rev 95923)
+++ 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Exceptions/DontSwallowErrorsCatchingNonspecificExceptionsRule.cs
     2008-02-16 21:05:26 UTC (rev 95924)
@@ -65,20 +65,20 @@
                        return exceptionHandler.HandlerStart;
                }
 
-               public RuleResult CheckMethod (MethodDefinition 
methodDefinition)
+               public RuleResult CheckMethod (MethodDefinition method)
                {
                        // rule only applies to methods with IL
-                       if (!methodDefinition.HasBody)
+                       if (!method.HasBody)
                                return RuleResult.DoesNotApply;
 
-                       ExceptionHandlerCollection exceptionHandlerCollection = 
methodDefinition.Body.ExceptionHandlers;
+                       ExceptionHandlerCollection exceptionHandlerCollection = 
method.Body.ExceptionHandlers;
                        foreach (ExceptionHandler exceptionHandler in 
exceptionHandlerCollection) {
                                if (exceptionHandler.Type == 
ExceptionHandlerType.Catch) {
                                        string catchTypeName = 
exceptionHandler.CatchType.FullName;
                                        if (IsForbiddenTypeInCatches 
(catchTypeName)) {
                                                Instruction throw_instruction = 
ThrowsGeneralException (exceptionHandler);
                                                if (throw_instruction != null) {
-                                                       Runner.Report 
(methodDefinition, throw_instruction, Severity.Medium, Confidence.High, 
String.Empty);
+                                                       Runner.Report (method, 
throw_instruction, Severity.Medium, Confidence.High, String.Empty);
                                                }
                                        }
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to