My data logger script wraps its main loop in begin ... rescue Exception => e so that it keeps running whatever happens, logging the error and continuing. Now Ctrl+C no longer stops it and I have to kill the process. A linter also flags the line and says to avoid rescuing Exception.
What is wrong with catching everything, what does a bare rescue catch, and how should a long-running script handle errors so that it survives failures but can still be stopped?




