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

Function __getCallContext

python/IECore/Log.py:79–87  ·  view source on GitHub ↗
(frame = None, withLineNumber = False)

Source from the content-addressed store, hash-verified

77 return frame.f_globals.get("__name__", frame.f_globals.get("__file__", "N/A"))
78
79def __getCallContext(frame = None, withLineNumber = False):
80 if frame is None:
81 f = inspect.currentframe().f_back.f_back
82 else:
83 f = frame
84 callStr = __getCallStr(f)
85 if withLineNumber:
86 callStr += " #" + str(f.f_lineno)
87 return callStr
88
89## Help function to track dificult errors.
90# It prints the callstack giving the module name and the line number.

Callers 7

showCallStackFunction · 0.85
exceptionInfoFunction · 0.85
debugExceptionFunction · 0.85
debugFunction · 0.85
warningFunction · 0.85
infoFunction · 0.85
errorFunction · 0.85

Calls 2

__getCallStrFunction · 0.85
strFunction · 0.50

Tested by

no test coverage detected