@@ -1195,7 +1195,7 @@ private void AnalyzeExceptionThrowingNode(
11951195 if ( ShouldIgnore ( node , mode ) )
11961196 {
11971197 // Report as THROW002 (Info level)
1198- var diagnostic = Diagnostic . Create ( RuleIgnoredException , GetExpression ( node ) . GetLocation ( ) , exceptionType . Name ) ;
1198+ var diagnostic = Diagnostic . Create ( RuleIgnoredException , GetSignificantNode ( node ) . GetLocation ( ) , exceptionType . Name ) ;
11991199 context . ReportDiagnostic ( diagnostic ) ;
12001200 return ;
12011201 }
@@ -1204,7 +1204,7 @@ private void AnalyzeExceptionThrowingNode(
12041204 // Check for general exceptions
12051205 if ( IsGeneralException ( exceptionType ) )
12061206 {
1207- context . ReportDiagnostic ( Diagnostic . Create ( RuleGeneralThrow , GetExpression ( node ) . GetLocation ( ) ) ) ;
1207+ context . ReportDiagnostic ( Diagnostic . Create ( RuleGeneralThrow , GetSignificantNode ( node ) . GetLocation ( ) ) ) ;
12081208 }
12091209
12101210 // Check if the exception is declared via [Throws]
@@ -1223,7 +1223,7 @@ private void AnalyzeExceptionThrowingNode(
12231223
12241224 var verb = isThrowingConstruct ? THROW001Verbs . Is : THROW001Verbs . MightBe ;
12251225
1226- var diagnostic = Diagnostic . Create ( RuleUnhandledException , GetExpression ( node ) . GetLocation ( ) , properties , exceptionType . Name , verb ) ;
1226+ var diagnostic = Diagnostic . Create ( RuleUnhandledException , GetSignificantNode ( node ) . GetLocation ( ) , properties , exceptionType . Name , verb ) ;
12271227 context . ReportDiagnostic ( diagnostic ) ;
12281228 }
12291229 }
0 commit comments