Validation - nsrosenqvist/quickscript GitHub Wiki
abort_if_failure()
Terminates the script if the value given is not 0
Similar functionality to just setting "set -e" but given more control to the user. The user simply pass $? from the previous command and if it wasn't successful it terminates the script and writes a message to the log and stderr.
Parameter | Explanation |
---|---|
(int) | $3 Optionally the $LINENO |
$1 (string) | The value to check is 0 |
$2 (string) | Optionally the log message |
return () - void
author: Niklas Rosenqvist
allow_no_errors()
Set -e shorthand
return (int) - Set's return value
author: Niklas Rosenqvist
allow_errors()
Set +e shorthand
return (int) - Set's return value
author: Niklas Rosenqvist