Another variant which I overlooked to often is if you have a construct which returns an error but does not exit the script later move it in a function and now it does exit the script.
set -e
[[ 0 == 1 ]] && true
echo Status: $?
will print "Status: 1" but set -e
func() {
[[ 0 == 1 ]] && true
}
func
echo Status: $?
will print nothing but exit after func returns.