Skip to content
Snippets Groups Projects
Unverified Commit a14a3f84 authored by Xavier Robin's avatar Xavier Robin
Browse files

refactor: save only the exception message

parent 62f78013
No related branches found
No related tags found
No related merge requests found
......@@ -631,10 +631,11 @@ def _Main():
with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False)
except Exception:
except Exception as exc:
out = dict()
out["status"] = "FAILURE"
out["traceback"] = traceback.format_exc()
out["traceback"] = traceback.format_exc(limit=1000)
out["exception"] = " ".join(traceback.format_exception_only(exc))
with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False)
raise
......
......@@ -897,10 +897,11 @@ def _Main():
out["status"] = "SUCCESS"
with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False)
except:
except Exception as exc:
out = dict()
out["status"] = "FAILURE"
out["traceback"] = traceback.format_exc()
out["exception"] = " ".join(traceback.format_exception_only(exc))
with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False)
raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment