MCPcopy Create free account
hub / github.com/ImageEngine/cortex / showCallStack

Function showCallStack

python/IECore/Log.py:92–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90# It prints the callstack giving the module name and the line number.
91## \ingroup python
92def showCallStack():
93
94 f = inspect.currentframe().f_back.f_back
95 index = 0
96 callstack = "Callstack:\n"
97 while not f is None:
98 callstack += "> " + str(index) + ": " + __getCallStr(f) + " #" + str(f.f_lineno) + "\n"
99 f = f.f_back
100 index += 1
101 IECore.Msg.output(IECore.Msg.Level.Debug, __getCallContext( withLineNumber = True ), callstack )
102
103## Use this function to get information about the context where the exception happened.
104# Returns a tuple of strings (location, stack trace) for the captured exception.

Callers

nothing calls this directly

Calls 4

__getCallStrFunction · 0.85
__getCallContextFunction · 0.85
outputMethod · 0.80
strFunction · 0.50

Tested by

no test coverage detected