Commit d7ea0cb8 authored by Ralf's avatar Ralf
Browse files

top-level exceptions, part 2

parent 0c2e0509
......@@ -2,7 +2,7 @@
from busfahrer import I2C
import statemachine, actor, ledactor, pins, tysock, waker, spaceapi
from libtuer import logger
import argparse
import sys, argparse
# Parse arguments
parser = argparse.ArgumentParser(description='Run a door')
......@@ -59,6 +59,7 @@ try:
the_api.stop()
the_actor.stop()
the_led_actor.stop()
except e:
except:
# Make sure we log the error and terminate. Otherwise, some random thread that still runs may prevent us from terminating.
logger.critical("FATAL TOP-LEVEL EXCEPTION:\n%s" % (self.name, traceback.format_exc()))
sys.exit(1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment