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

Function exceptionInfo

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

Source from the content-addressed store, hash-verified

104# Returns a tuple of strings (location, stack trace) for the captured exception.
105## \ingroup python
106def exceptionInfo():
107 (exceptionType, exception, trace) = sys.exc_info()
108 etb = traceback.extract_tb(trace)
109 exceptionType = str(exceptionType.__name__) + ": " + str(exception)
110 exceptInfo = ""
111 for (module, line, function, location) in etb:
112 exceptInfo += " File " + str(module) + ", line " + str(line) + ", in " + str(function) + "\n> " + str(location) + "\n"
113 return ( __getCallContext( withLineNumber = True ), "Exception traceback:\n" + exceptInfo + exceptionType)
114
115## Sends debug messages to the current message handler and appends a full description of the catched exception.
116# Parameters:

Callers

nothing calls this directly

Calls 2

__getCallContextFunction · 0.85
strFunction · 0.50

Tested by

no test coverage detected