MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / _log_exception

Function _log_exception

web/pgadmin/misc/bgprocess/process_executor.py:75–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73
74
75def _log_exception():
76 type_, value_, traceback_ = sys.exc_info()
77
78 with open(_log_file, 'a') as fp:
79 from traceback import format_exception
80 res = ''.join(
81 format_exception(type_, value_, traceback_)
82 )
83
84 fp.write('EXCEPTION::\n{0}'.format(res))
85 return res
86
87
88# Copied the 'UTC' class from the 'pytz' package to allow to run this script

Callers 3

Calls 2

joinMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected