Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Bash
Posted by: Gerrit Viljoen
Added: Sep 30, 2014 9:57 AM
Modified: Oct 10, 2014 8:23 AM
Views: 160
  1. error_handler() {
  2.     echo "Error at line ${1} returned ${2}"
  3. }
  4. trap 'error_handler ${LINENO} $?' ERR
  5. set -o nounset
  6. set -o errexit
  7. set -o pipefail
  8.