Error handling (Entry Nr. 177, by user 1 | edit) |
|
|
Put this line in a shellscript, and the rest of the script will terminate on any error:
set -e
Another - rather undocumented - way. It wont work if your script uses subshell stuff (putting commands in parenthesis) but you can define an error handling function:
trap 'echo error trapped!;exit 1' err; |
|
|
Create a new entry at this position
|
|
|