Class VBErrorInfo
Encapsulates the serializable error data for an error.
public abstract record VBErrorInfo : IEquatable<VBErrorInfo>
- Inheritance
-
VBErrorInfo
- Implements
- Derived
- Inherited Members
Remarks
🧩 Errors should be used to generate error diagnostics.
Constructors
VBErrorInfo(int, SourceLocation, string, string)
Encapsulates the serializable error data for an error.
protected VBErrorInfo(int ErrorId, SourceLocation Location, string Description, string Verbose)
Parameters
ErrorIdintThe numeric (
int) representation of the formal error code.LocationSourceLocationThe document location of the faulted CST node.
DescriptionstringAn optional error description. "Syntax error" unless specified otherwise.
VerbosestringA detailed message identifying the faulted CST token and detailing its semantics, as plain text. For a run-time error the runtime recorded Details of, it is their Message: what a client that formats no details shows.
Remarks
🧩 Errors should be used to generate error diagnostics.
Properties
Description
An optional error description. "Syntax error" unless specified otherwise.
public string Description { get; init; }
Property Value
Details
What the runtime was doing when it raised the error, as data: the expression, and the frames of the operation that failed. A client formats them its own way.
public VBErrorDetails? Details { get; init; }
Property Value
Remarks
null for an error the runtime recorded no details of: a syntax or compile error, or a run-time error raised where nothing was being evaluated.
ErrorId
The numeric (int) representation of the formal error code.
public int ErrorId { get; init; }
Property Value
Location
The document location of the faulted CST node.
public SourceLocation Location { get; init; }
Property Value
Verbose
A detailed message identifying the faulted CST token and detailing its semantics, as plain text. For a run-time error the runtime recorded Details of, it is their Message: what a client that formats no details shows.
public string Verbose { get; init; }