mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Merge pull request #2559 from pypeclub/feature/OP-2399_Webpublisher-Better-error-messages-for-users
Webpublisher: Moved error at the beginning of the log
This commit is contained in:
commit
d9143b9b25
1 changed files with 3 additions and 2 deletions
|
|
@ -95,7 +95,8 @@ def publish_and_log(dbcon, _id, log, close_plugin_name=None):
|
|||
close host app
|
||||
"""
|
||||
# Error exit as soon as any error occurs.
|
||||
error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}"
|
||||
error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}\n"
|
||||
error_format += "-" * 80 + "\n"
|
||||
|
||||
close_plugin = _get_close_plugin(close_plugin_name, log)
|
||||
|
||||
|
|
@ -114,7 +115,7 @@ def publish_and_log(dbcon, _id, log, close_plugin_name=None):
|
|||
if result["error"]:
|
||||
log.error(error_format.format(**result))
|
||||
uninstall()
|
||||
log_lines.append(error_format.format(**result))
|
||||
log_lines = [error_format.format(**result)] + log_lines
|
||||
dbcon.update_one(
|
||||
{"_id": _id},
|
||||
{"$set":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue