From 694968fa81aab4eac81309b1e16f6063103dd57f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 4 Jun 2018 15:59:14 +0100 Subject: Hopefully, fix LaterGuage error handling --- synapse/metrics/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'synapse') 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(): -- cgit 1.4.1