handle errors while parsing dprs data

This commit is contained in:
Jakob Ketterl 2021-07-09 13:52:33 +02:00
parent 6a59369c62
commit 4e61ed3645

View File

@ -122,6 +122,7 @@ class DStarEnricher(Enricher):
loc = LatLngLocation(meta["lat"], meta["lon"])
Map.getSharedInstance().updateLocation(meta["ourcall"], loc, "D-Star", self.parser.getBand())
if "dprs" in meta:
try:
# we can send the DPRS stuff through our APRS parser to extract the information
# TODO: only third-party parsing accepts this format right now
# TODO: we also need to pass a handler, which is not needed
@ -138,6 +139,8 @@ class DStarEnricher(Enricher):
# send location info to map as well (it will show up with the correct symbol there!)
loc = AprsLocation(data)
Map.getSharedInstance().updateLocation(meta["ourcall"], loc, "DPRS", self.parser.getBand())
except Exception:
logger.exception("Error while parsing DPRS data")
return meta