We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
[Diagnostic].Report()
IncrementalGenerator
1 parent d461701 commit d571102Copy full SHA for d571102
1 file changed
src/roslyn/Riverside.CompilerPlatform.SourceGenerators/IncrementalGenerator.cs
@@ -1,4 +1,5 @@
1
-using System;
+using Riverside.CompilerPlatform.Extensions;
2
+using System;
3
using System.Collections.Generic;
4
using System.Diagnostics;
5
using System.Linq;
@@ -249,12 +250,11 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
249
250
if (!SuppressDiagnostics)
251
{
252
// Report exceptions that occur during generation
- sourceProductionContext.ReportDiagnostic(
253
CreateDiagnostic(
254
$"RS9999",
255
"Source Generation Error",
256
$"An error occurred during source generation: {ex.Message}",
257
- DiagnosticSeverity.Error));
+ DiagnosticSeverity.Error).Report(Context);
258
}
259
260
});
0 commit comments