Open fabaff opened 8 years ago
It is actually the plan for raised exceptions to roll over and attend to, for example,
These 3 cover essentially all errors for no gpsd, wrong port, no host.
Looking In the gpsd project, you'll see fake.py
has a daemon check and a method to respawn an instance of gpsd, but with the introduction of systemd scripts I'm still trying to sort out a process viable in older POSIX systems and the new daemon handling systems. I've not done that yet.
Error handling networked failures is another layer of complexity.
So, currently if it can't, it just tells you the problem rather than attempt 'fixing it'.
But, yeah, the client should roll with the punches, rather than spit you out on the street.
I'm working on an integration of GPSD into Home-Assistant.io and using your project.
Have you considered to raise exceptions instead of printing to STDOUT if there is no connection possible or another problem occurs?