I have a /bin/foo shell script file. 
How to exit a shell script on error AND message the user?
If I simply use a set -e then it exits on error, but no commands running when it hits error, like sending a message to STDOUT or sending a mail. 
The question: how to run a command if the shell script runs to an error?
SLES12, bash.