Skip to content

Commit

Permalink
Add a top-level exception handler
Browse files Browse the repository at this point in the history
As the comment says: let's see if adding a top-level handler (that then
re-raises) and catching BaseException will give us more info as to
what's sometimes causing Tron to exit.

I've also added the usual base exception (Exception) just to be
extra-safe

(h/t to krall for the idea)
  • Loading branch information
nemacysts committed Mar 27, 2024
1 parent 26069d7 commit c1f1ef9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bin/trond
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,16 @@ def main():


if __name__ == "__main__":
main()
try:
main()
# this is a little weird, but every now and then we're seeing a mysterious tron exit
# that doesn't seem to correspond with anything else - let's catch BaseException
# (and therefore SystemExit) in case anything is calling sys.exit() since there's no
# traceback when we see this
except (
BaseException,
# technically, we really only need to catch BaseException - but let's be extra-paranoid
Exception,
):
traceback.print_exc()
raise

0 comments on commit c1f1ef9

Please sign in to comment.