Libraries anvil runtime stack

namespace stack
Set of functions for investigating the contents of stack

Functions

StackFrameElement getFrame()
returns contents of current frame
StackFrameElement getFrame(int frame)
returns contents of given frame
Returns the contents of of given frame
Parameters frame -  Frame number, zero is oldest.

int getFrameCount()
Returns the number of frames in stack.
Returns Number of frames

Function getFunction()
returns function of current frame
Function getFunction(int frame)
returns function of given frame
Returns the function of given frame
Parameters frame -  Frame number, zero is oldest.
Returns Instance of function

string getLine()
returns line of current frame
string getLine(int frame)
returns line of given frame
Returns the line number of given frame. Line numbers are not guaranteed to be accurate.
Parameters frame -  Frame number, zero is oldest.
Returns Line number

module getModule()
returns module of current frame
module getModule(int frame)
returns module of given frame
Returns the script of given frame
Parameters frame -  Frame number, zero is oldest.
Returns Instance of module

string getPathinfo()
returns pathinfo of current frame
string getPathinfo(int frame)
returns pathinfo of given frame
Returns the pathinfo of given frame
Parameters frame -  Frame number, zero is oldest.
Returns Pathinfo

list getStack()
Returns the full dump of stack trace as list of StackTraceElement:s.
Returns Dump of stack

class getClass()
returns 'this' of current frame
class getClass(int frame)
returns 'this' of given frame
Returns the 'this' of given frame
Parameters frame -  Frame number, zero is oldest.
Returns Instance of class

list getZone()
returns zone of current frame
list getZone(int frame)
returns zone of given frame
Returns the zone of of given frame
Parameters frame -  Frame number, zero is oldest.
Returns Zone

void printStack()
Informative print from stack for debugging.