meta data for this page
This is an old revision of the document!
BASH: Error handling
function exit on error
Construction similar to try-catch:
task() { ( set -e set -o pipefail echo "task() started" do_command1 && banner OK || banner ERROR do_command2 && banner OK || banner ERROR build_cmd_step_1 build_cmd_step_2 build_cmd_step_3 ... )} task()