mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Improve logging with stacktrace of errors.
This commit is contained in:
parent
e5fd39d911
commit
873e5cb35b
1 changed files with 14 additions and 3 deletions
|
|
@ -43,9 +43,20 @@ class BaseEvent(BaseHandler):
|
|||
self.session.rollback()
|
||||
self.session._local_cache.clear()
|
||||
|
||||
self.launch(
|
||||
self.session, event
|
||||
)
|
||||
try:
|
||||
self.launch(
|
||||
self.session, event
|
||||
)
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
log_message = "{}/{}/Line: {}".format(
|
||||
exc_type, fname, exc_tb.tb_lineno
|
||||
)
|
||||
self.log.error(
|
||||
'Error during syncToAvalon: {}'.format(log_message),
|
||||
exc_info=True
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue