mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-24 08:58:49 -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:
parent
9f3c8f889f
commit
adcf94d8c7
@ -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):
|
||||||
|
try:
|
||||||
self._client.consumer(
|
self._client.consumer(
|
||||||
callback, blocking=blocking,
|
callback, blocking=blocking,
|
||||||
immortal=immortal, raw=raw,
|
immortal=immortal, raw=raw,
|
||||||
)
|
)
|
||||||
|
except Exception as e:
|
||||||
|
LOG.error(f"Exception in consumer: {e}")
|
||||||
|
Loading…
Reference in New Issue
Block a user