File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -151,10 +151,18 @@ public bool GenerateReport(
151
151
return false ;
152
152
}
153
153
154
- Logger . Debug ( Resources . Settings ) ;
155
- Logger . Debug ( " " + System . Text . Json . JsonSerializer . Serialize ( settings ) ) ;
156
- Logger . Debug ( " " + System . Text . Json . JsonSerializer . Serialize ( minimumCoverageThresholds ) ) ;
157
- Logger . Debug ( " " + System . Text . Json . JsonSerializer . Serialize ( riskHotspotsAnalysisThresholds ) ) ;
154
+ try
155
+ {
156
+ string settingsAsJson = System . Text . Json . JsonSerializer . Serialize ( settings ) ;
157
+ Logger . Debug ( Resources . Settings ) ;
158
+ Logger . Debug ( " " + settingsAsJson ) ;
159
+ Logger . Debug ( " " + System . Text . Json . JsonSerializer . Serialize ( minimumCoverageThresholds ) ) ;
160
+ Logger . Debug ( " " + System . Text . Json . JsonSerializer . Serialize ( riskHotspotsAnalysisThresholds ) ) ;
161
+ }
162
+ catch ( InvalidOperationException )
163
+ {
164
+ // Json serialization may fail in AOT scenarios
165
+ }
158
166
159
167
var stopWatch = Stopwatch . StartNew ( ) ;
160
168
You can’t perform that action at this time.
0 commit comments