summary refs log tree commit diff
path: root/synapse/metrics
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-06-04 15:59:14 +0100
committerRichard van der Hoff <richard@matrix.org>2018-06-04 15:59:14 +0100
commit694968fa81aab4eac81309b1e16f6063103dd57f (patch)
treeab729a1f585ac06ef5e08dd2083b3d6acc133aac /synapse/metrics
parentPut python's logs into Trial when running unit tests (#3319) (diff)
downloadsynapse-694968fa81aab4eac81309b1e16f6063103dd57f.tar.xz
Hopefully, fix LaterGuage error handling
Diffstat (limited to 'synapse/metrics')
-rw-r--r--synapse/metrics/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index 56c0032f91..429e79c472 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -60,10 +60,13 @@ class LaterGauge(object):
 
         try:
             calls = self.caller()
-        except Exception as e:
-            print(e)
-            logger.err()
+        except Exception:
+            logger.exception(
+                "Exception running callback for LaterGuage(%s)",
+                self.name,
+            )
             yield g
+            return
 
         if isinstance(calls, dict):
             for k, v in calls.items():