Added debug function
This commit is contained in:
parent
e4f94c9d0b
commit
8e1e2a9c54
|
@ -144,6 +144,12 @@ def rand():
|
||||||
result = instance_random.random()
|
result = instance_random.random()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def trace_exception(e):
|
||||||
|
import traceback
|
||||||
|
exception_info = "".join(traceback.TracebackException.from_exception(e).format())
|
||||||
|
log(f"An unhandled {str(type(e))} exception occurred: {str(e)}", LOG_ERROR)
|
||||||
|
log(exception_info, LOG_ERROR)
|
||||||
|
|
||||||
def hexrep(data, delimit=True):
|
def hexrep(data, delimit=True):
|
||||||
try:
|
try:
|
||||||
iter(data)
|
iter(data)
|
||||||
|
|
Loading…
Reference in New Issue