printStackTrace (--)

Inputs

Outputs

printStackTrace does not change the data stack. It only prints the current scope stack.

Behavior

Example: how calls nest, innermost first

printStackTrace prints the current call chain during compilation, innermost first: the call itself, then inner, outer, and exportFunction, each with its position in test.mpl.

test.mpl

{} 0 {} [
  inner: [printStackTrace];
  outer: [inner];
  outer
  0
] "main" exportFunction

Expected Output During Compilation

test.mpl(2,11): «printStackTrace»
test.mpl(3,11): «inner», Called from here
test.mpl(4,3): «outer», Called from here
test.mpl(6,10): «exportFunction», Called from here

See also