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

Function debugException

python/IECore/Log.py:119–130  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

117# Any string or object. They are converted to string and separated by space.
118## \ingroup python
119def debugException(*args):
120
121 # same as debug
122 stdStr = " ".join(map(str, args))
123
124 (exceptionType, exception, trace) = sys.exc_info()
125 etb = traceback.extract_tb(trace)
126 exceptionType = "> " + str(exceptionType.__name__) + ": " + str(exception)
127 exceptInfo = ""
128 for (module, line, function, location) in etb:
129 exceptInfo += "> File " + str(module) + ", line " + str(line) + ", in " + str(function) + "\n> " + str(location) + "\n"
130 IECore.Msg.output(IECore.Msg.Level.Debug, __getCallContext( withLineNumber = True ), "[EXCEPTION CAPTURED] " + stdStr + "\n> Exception traceback:\n" + exceptInfo + exceptionType)
131
132## Sends debug messages to the current message handler.
133# Every message include information about the module and line number from where this function was called.

Callers

nothing calls this directly

Calls 4

__getCallContextFunction · 0.85
joinMethod · 0.80
outputMethod · 0.80
strFunction · 0.50

Tested by

no test coverage detected