-
Notifications
You must be signed in to change notification settings - Fork 0
API Host AuroraStackTrace
Single script stack frame.
Namespace: AuroraScript.Runtime. Kind: class.
Back to .NET Host API Reference
AuroraStackTrace describes one frame of a script-level call stack: the script file, the method, and the line. Hosts normally read frames from AuroraRuntimeException.StackTrace rather than constructing them, but the constructor is public so a host can synthesize frames for its own error reporting.
A minimal use of AuroraStackTrace.
var frame = new AuroraStackTrace(
"scripts/main.as",
"main",
12);
Console.WriteLine(frame);AuroraStackTrace(string path, string method, int line)Creates a script stack frame.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path |
string |
Yes | Script path the frame belongs to. |
method |
string |
Yes | Script method name. |
line |
int |
Yes | Script line number. |
Returns
A new AuroraStackTrace instance.
var frame = new AuroraStackTrace("scripts/main.as", "run", 12);string FileNameFile name portion of the frame path.
Parameters
None.
Returns
Returns string.
Console.WriteLine(frame.FileName);string FullPathFull script path of the frame.
Parameters
None.
Returns
Returns string.
Console.WriteLine(frame.FullPath);string MethodScript method name of the frame.
Parameters
None.
Returns
Returns string.
Console.WriteLine(frame.Method);int LineScript line number of the frame.
Parameters
None.
Returns
Returns int.
Console.WriteLine($"{frame.FileName}:{frame.Line}");string ToString()Formats the frame as a displayable stack line.
Parameters
None.
Returns
Returns string.
foreach (var frame in ex.StackTrace)
Console.Error.WriteLine(frame.ToString());AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License