From c6b5c577ab0e8e70f76af5e968fcf7370b1cfb1f Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 10 Nov 2016 23:26:11 +0900 Subject: [PATCH] More robust daemon error handling Fixes #6 --- server/daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/daemon.py b/server/daemon.py index e94af41..7a886fe 100644 --- a/server/daemon.py +++ b/server/daemon.py @@ -91,6 +91,10 @@ class Daemon(util.LoggedClass): msg = 'connection problem - is your daemon running?' except DaemonWarmingUpError: msg = 'still starting up checking blocks...' + except (asyncio.CancelledError, DaemonError): + raise + except Exception as e: + msg = ('request gave unexpected error: {}'.format(e)) if msg != prior_msg or count == 10: self.logger.error('{}. Retrying between sleeps...'