confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 770343d49da33bab5025d37d5227c91bbf5f7294
parent 70e7f3993fef34df77e644d35e36b899a46731f2
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Sat, 17 Sep 2022 13:12:04 +0200

Include function names in call stack
Diffstat:
Mbin/confz | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/confz b/bin/confz @@ -18,7 +18,10 @@ typeset -g confz_indent check_only verbose fail_reason quiet # helper that prints out error message and exits die() { print -r - "$fg_bold[red]Fatal$reset_color error occurend in:" >&2 - printf '> %s\n' $funcfiletrace + local n + for n in {1..${#funcfiletrace}}; do + printf '%d> %s (%s)\n' $n "$funcfiletrace[$n]" "$functrace[$n]" + done print -r - "$fg_bold[red]*$reset_color $@" >&2 exit 1 }