Exit with error on untrapped error detected
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
d455e84b7e
commit
598b8f8617
@ -5773,10 +5773,14 @@ esac
|
||||
|
||||
# Check for untrapped errors
|
||||
# shellcheck disable=SC2181
|
||||
[ $? = 0 ] || warn "Untrapped error detected!"
|
||||
if [ $? = 0 ]; then
|
||||
# Do 'cleanup ok' on successful completion
|
||||
#print "mktemp_counter: $mktemp_counter uses"
|
||||
cleanup ok
|
||||
fi
|
||||
|
||||
# Do 'cleanup ok' on successful completion
|
||||
#print "mktemp_counter: $mktemp_counter uses"
|
||||
cleanup ok
|
||||
# Otherwise, exit with error
|
||||
warn "Untrapped error detected!"
|
||||
cleanup
|
||||
|
||||
# vim: ft=sh nu ai sw=8 ts=8 noet
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user