Skip to content

Commit

Permalink
catch all exception
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Feb 2, 2024
1 parent 4bd259a commit 49e10f1
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,20 @@ def main():
},
}
)
except Exception:
exc_type, exc_value, tb = sys.exc_info()
result = json.dumps(
{
"msg_type": "inspect_reply",
"content": {
"status": "error",
"ename": str(exc_type.__name__),
"evalue": "cannot json-ify %s: %s"
% (response, str(exc_value)),
"traceback": [],
},
}
)

print(result, file=sys_stdout)
sys_stdout.flush()
Expand Down

0 comments on commit 49e10f1

Please sign in to comment.