Table of Contents

Class VBStackTrace

Namespace
RDCore.SDK.Model.Errors
Assembly
RDCore.SDK.dll

The call stack a run-time error was raised on, innermost activation first.

public sealed record VBStackTrace : IEquatable<VBStackTrace>
Inheritance
VBStackTrace
Implements
Inherited Members

Remarks

🎯 RDCore's own, not MS-VBAL's: VBA has never been able to say where an error came from, only what it was, which is why Err.Description in a deep call chain tells you so little. ErrObject carries this alongside the error's own properties, captured at the moment the error is raised — the one point every run-time error passes through — rather than reconstructed afterwards, by which time the frames are gone.

Constructors

VBStackTrace(ImmutableArray<VBStackTraceFrame>)

The call stack a run-time error was raised on, innermost activation first.

public VBStackTrace(ImmutableArray<VBStackTraceFrame> Frames)

Parameters

Frames ImmutableArray<VBStackTraceFrame>

The activations, innermost (where the error was raised) first.

Remarks

🎯 RDCore's own, not MS-VBAL's: VBA has never been able to say where an error came from, only what it was, which is why Err.Description in a deep call chain tells you so little. ErrObject carries this alongside the error's own properties, captured at the moment the error is raised — the one point every run-time error passes through — rather than reconstructed afterwards, by which time the frames are gone.

Properties

Empty

No stack trace: what a session with no current error has.

public static VBStackTrace Empty { get; }

Property Value

VBStackTrace

Frames

The activations, innermost (where the error was raised) first.

public ImmutableArray<VBStackTraceFrame> Frames { get; init; }

Property Value

ImmutableArray<VBStackTraceFrame>

Methods

ToString()

The trace as VBA source reads it through Err.StackTrace: one indented line per activation, innermost first, separated by vbCrLf.

public override string ToString()

Returns

string

Remarks

👉 vbCrLf rather than the host's own line separator: a VBA String's line break is CrLf whatever platform the environment host runs on.