Struct StackFrameInfo
Represents the top of a stack frame, typically taken from an exception or failure information.
public readonly struct StackFrameInfo
- Inherited Members
Constructors
StackFrameInfo(string?, int)
Represents the top of a stack frame, typically taken from an exception or failure information.
public StackFrameInfo(string? fileName, int lineNumber)
Parameters
fileNamestringThe file name from the stack frame
lineNumberintThe line number from the stack frame
Fields
None
Get a default (unknown) stack frame info.
public static readonly StackFrameInfo None
Field Value
Properties
FileName
Gets the filename of the stack frame. May be null if the stack frame is not known.
public string? FileName { get; }
Property Value
IsEmpty
Returns true if this is an empty stack frame (e.g., None).
public bool IsEmpty { get; }
Property Value
LineNumber
Gets the line number of the stack frame. May be 0 if the stack frame is not known.
public int LineNumber { get; }
Property Value
Methods
FromErrorMetadata(IErrorMetadata?)
Creates a stack frame info from error metadata.
public static StackFrameInfo FromErrorMetadata(IErrorMetadata? errorMetadata)
Parameters
errorMetadataIErrorMetadataThe error to inspect
Returns
- StackFrameInfo
The stack frame info