I’m currently wrapping scripts with begin; rescue; end. Which works, but is annoying to un/comment at two different places and so on. Is there something like error_reporting(0); in PHP, but applied to the exit code and STDERR output?
I’m currently wrapping scripts with begin; rescue; end . Which works, but is annoying
Share
You could try trapping the EXIT signal:
Something like this should guarantee that your script always returns zero to the operating system:
For example, this script:
actually returns zero to the OS despite triggering script’s termination with
exit 1.