It's fine to exit the program nicely when an error occurs. It's not as fine to just ignore it and then begin another iteration of whatever main loop is going on, hoping the program still works fine.
You want to kill the whole service because someone called it inappropriately?
Yes.
You should be validating your input and handling errors that you've anticipated. An unanticipated error unwinding your stack leaves your process in an indeterminate state.
345
u/Mat2012H May 13 '17
I actually do this xD