A derivation of CSharpSyntaxVisitor that provides enhanced exception handling when visiting syntax nodes without returning a result.
Namespace: Metalama.Framework.Engine.Utilities.Roslyn
Assembly: Metalama.Framework.Sdk.dll
Syntax
public abstract class SafeSyntaxVisitor : CSharpSyntaxVisitorRemarks
This class wraps exceptions thrown during node visitation with Metalama.Framework.Engine.Utilities.Roslyn.SyntaxProcessingException, which includes detailed information about the syntax node being processed when the exception occurred. This makes debugging weaver issues significantly easier.
Use this class instead of directly inheriting from CSharpSyntaxVisitor in your aspect weaver implementations. Override VisitCore(SyntaxNode?) instead of Visit(SyntaxNode?) to add custom visiting logic.
Constructors
| Name | Description |
|---|---|
| SafeSyntaxVisitor() |
Methods
| Name | Description |
|---|---|
| Visit(SyntaxNode?) | |
| VisitCore(SyntaxNode?) |