getCallTrace

getCallTrace (-- callTrace)

Inputs

Outputs

getCallTrace returns the structured immutable Ref itself.

The result schema is an immutable Ref to the callTraceItem type. In formatted form, that referent schema is:

{
  name: Text;
  line: Int32;
  column: Int32;
  prev: Natx;
}

The referent fields mean:

The structured result does not include a file path.

Behavior

Example

{} 0 {} [
  "-- immutable Ref result --" printCompilerMessage
  getCallTrace isConst printStack _:;
  getCallTrace printStack _:;
  0
] "main" exportFunction

Expected Output During Compilation

-- immutable Ref result --
TRUE
{
  name: Text;
  line: Int32;
  column: Int32;
  prev: Natx;
} CNIL

See also