Services throwing exceptions may exit with exit code 0
If a service exits with a code 0, then Warlock thinks that the service actually wants to exit, so it shuts it down, whereas in reality, the service should be restarted. It appears that if the service throws an exception on an event handler, the service will exit(0)
.
What probably should happen is, if the exception occurs in the main process, then restart the service, but if it's an event handler, simply log the error and carry on.