def print_handler(string): try: for char in string: monitor.put(char) except BaseException as e: machine.debug("print_handler exc =? %s: %s" % (type(e).__name__, e))
def signal_handler(ticks): signal = pop_signal(ticks) if not signal: return name, args = signal handlers = registered.get(name) if not handlers: return for handler in handlers: try: handler(*args) except BaseException as e: machine.debug("signal_handler exc => %s: %s" % (type(e).__name__, e))
def print_handler(string): machine.debug(string)
def on_error(e): machine.debug("signal_handler exc => %s: %s" % (type(e).__name__, e))