#######################################
_err-bash-trace-interactive() {
+ if (( ${#FUNCNAME[@]} <= 1 )); then
+ return 0
+ fi
+
+ for pattern in "${err_catch_ignore[@]}"; do
+ # shellcheck disable=SC2053
+ if [[ ${BASH_SOURCE[1]} == $pattern ]]; then
+ return 0
+ fi
+ done
+
local ret bash_command argc pattern i last
last=$_err_func_last
_err_func_last=${#FUNCNAME[@]}
- if (( _err_func_last <= 1 )); then
- return 0
- fi
# We have these passed to us because they are lost inside the
# function.
ret=$1
argc=$(( $3 - 1 ))
shift 3
argv=("$@")
- for pattern in "${err_catch_ignore[@]}"; do
- # shellcheck disable=SC2053
- if [[ ${BASH_SOURCE[1]} == $pattern ]]; then
- return 0
- fi
- done
# The trap returns a nonzero, then gets called again. This condition
# tells us if we are the first.
if (( _err_func_last > last )); then