improve error reporting and handling
Currently, some assertions seem to be used as a way to report unlikely events, and when these are used in production, they can cause needless crashes (even though they're then handled by systemd's Restart=on-abnormal
facility)
I propose the following changes:
- The code should not rely on assertions, if it does, it's a bug that should be fixed.
- Errors, even unlikely ones (currently handled by assertions) should be logged properly.
There could be an option (off by default) to enable reporting these remotely.
Edited by Tomas Krizek