1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-21 15:51:52 -05:00

Catch and log exceptions in consumer

This patch adds a try except block around the APRSIS
consumer.  This gives us a chance to log the specific
exception, so we can see why the consumer failed.
This commit is contained in:
Hemna 2024-11-08 13:21:38 -05:00
parent 9f3c8f889f
commit adcf94d8c7

View File

@ -126,7 +126,10 @@ class APRSISClient(base.APRSClient):
return aprs_client return aprs_client
def consumer(self, callback, blocking=False, immortal=False, raw=False): def consumer(self, callback, blocking=False, immortal=False, raw=False):
self._client.consumer( try:
callback, blocking=blocking, self._client.consumer(
immortal=immortal, raw=raw, callback, blocking=blocking,
) immortal=immortal, raw=raw,
)
except Exception as e:
LOG.error(f"Exception in consumer: {e}")