Class VBErrorDetails
What the runtime was doing when it raised an error, recorded as data at the moment the error was raised: the expression it was evaluating, and the frames of the operation that failed, innermost first.
public sealed record VBErrorDetails : IEquatable<VBErrorDetails>
- Inheritance
-
VBErrorDetails
- Implements
- Inherited Members
Remarks
The runtime records these and formats none of them: each client formats them its own way. A client that formats nothing shows Message, which is also the error's plain-text verbose message.
They are recorded only when an error is raised, never on the path of an evaluation that succeeds.
The snapshot of the frames is bounded: at most MaxFrames frames are recorded, the innermost ones, and FramesTruncated says whether the operation had more. An error raised deep in a recursion carries no more than that bound, on the wire or anywhere else.
Constructors
VBErrorDetails(string, VBErrorExpression?, IReadOnlyList<VBErrorFrame>, bool)
What the runtime was doing when it raised an error, recorded as data at the moment the error was raised: the expression it was evaluating, and the frames of the operation that failed, innermost first.
public VBErrorDetails(string Message, VBErrorExpression? Expression, IReadOnlyList<VBErrorFrame> Frames, bool FramesTruncated = false)
Parameters
MessagestringWhat the runtime says of the error, beyond its description: why the operation failed, in a sentence.
ExpressionVBErrorExpressionThe expression the error was raised at, or null when the error was raised at none.
FramesIReadOnlyList<VBErrorFrame>The frames of the operation the error was raised in, innermost first: at most MaxFrames of them. Empty when the operation has none.
FramesTruncatedbooltrue when the operation had more than MaxFrames frames, and only the innermost MaxFrames are in
Frames.
Remarks
The runtime records these and formats none of them: each client formats them its own way. A client that formats nothing shows Message, which is also the error's plain-text verbose message.
They are recorded only when an error is raised, never on the path of an evaluation that succeeds.
The snapshot of the frames is bounded: at most MaxFrames frames are recorded, the innermost ones, and FramesTruncated says whether the operation had more. An error raised deep in a recursion carries no more than that bound, on the wire or anywhere else.
Fields
MaxFrames
The greatest number of frames the details of an error record: 64. The frames past it, the outermost ones, are left out, and FramesTruncated is true.
public const int MaxFrames = 64
Field Value
Properties
Expression
The expression the error was raised at, or null when the error was raised at none.
public VBErrorExpression? Expression { get; init; }
Property Value
Frames
The frames of the operation the error was raised in, innermost first: at most MaxFrames of them. Empty when the operation has none.
public IReadOnlyList<VBErrorFrame> Frames { get; init; }
Property Value
FramesTruncated
true when the operation had more than MaxFrames frames, and only the innermost MaxFrames are in
Frames.
public bool FramesTruncated { get; init; }
Property Value
Message
What the runtime says of the error, beyond its description: why the operation failed, in a sentence.
public string Message { get; init; }