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
|
# Check for untrapped errors
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
[ $? = 0 ] || warn "Untrapped error detected!"
|
if [ $? = 0 ]; then
|
||||||
|
|
||||||
# Do 'cleanup ok' on successful completion
|
# Do 'cleanup ok' on successful completion
|
||||||
#print "mktemp_counter: $mktemp_counter uses"
|
#print "mktemp_counter: $mktemp_counter uses"
|
||||||
cleanup ok
|
cleanup ok
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Otherwise, exit with error
|
||||||
|
warn "Untrapped error detected!"
|
||||||
|
cleanup
|
||||||
|
|
||||||
# vim: ft=sh nu ai sw=8 ts=8 noet
|
# vim: ft=sh nu ai sw=8 ts=8 noet
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user