Table of Contents

Class ParserEmbeddedCodeTransformationException

Namespace
Utils.Parser.Diagnostics.EmbeddedCode
Assembly
Utils.Parser.Diagnostics.dll

Exception thrown by the central embedded-code transformation service when transformation fails.

public class ParserEmbeddedCodeTransformationException : Exception, ISerializable
Inheritance
ParserEmbeddedCodeTransformationException
Implements
Derived
Inherited Members
Extension Methods

Constructors

ParserEmbeddedCodeTransformationException(string, string?, string?, ParserEmbeddedCodeTransformationPath, ParserEmbeddedCodeLocation, string?, string?, SourceSpan?, Exception?)

Initializes a new transformation exception with structured diagnostic metadata.

public ParserEmbeddedCodeTransformationException(string message, string? diagnosticCode, string? diagnosticMessage, ParserEmbeddedCodeTransformationPath path, ParserEmbeddedCodeLocation location, string? grammarName, string? ruleName, SourceSpan? span, Exception? innerException = null)

Parameters

message string

Stable failure message.

diagnosticCode string

Diagnostic code when one is available.

diagnosticMessage string

Diagnostic message when one is available.

path ParserEmbeddedCodeTransformationPath

Transformation path that requested the embedded-code transformation.

location ParserEmbeddedCodeLocation

Embedded-code location being transformed.

grammarName string

Owning grammar name when available.

ruleName string

Owning parser rule name when available.

span SourceSpan

Source span when available.

innerException Exception

Original transformer exception when transformation failed by throwing.

Properties

DiagnosticCode

Gets the diagnostic code when one is available.

public string? DiagnosticCode { get; }

Property Value

string

DiagnosticMessage

Gets the diagnostic message when one is available.

public string? DiagnosticMessage { get; }

Property Value

string

GrammarName

Gets the owning grammar name when available.

public string? GrammarName { get; }

Property Value

string

Location

Gets the embedded-code location being transformed.

public ParserEmbeddedCodeLocation Location { get; }

Property Value

ParserEmbeddedCodeLocation

Path

Gets the transformation path that requested the embedded-code transformation.

public ParserEmbeddedCodeTransformationPath Path { get; }

Property Value

ParserEmbeddedCodeTransformationPath

RuleName

Gets the owning rule name when available.

public string? RuleName { get; }

Property Value

string

Span

Gets the source span when available.

public SourceSpan? Span { get; }

Property Value

SourceSpan