When set -o ERR is set the exit case wasn't executed. From the bash
manual page:
"The ERR trap is not executed if the
failed command is part of the command list immediately following
a while or until keyword, part of the test in an if statement,
part of a command executed in a && or || list except the command
following the final && or ||, any command in a pipeline but the
last, or if the command's return value is being inverted using
!. These are the same conditions obeyed by the errexit (-e)
option."