Leave 'set -e' only within the building section, otherwise the BEGIN ERROR ... END ERROR message is never shown.