function main {
if ! failing_cmd; then log "this fails!" return 1 fi log "this won't log"
main
I only mention this because there are folks who don't like set -e.