gaboshlib/g_traceback.sh aktualisiert
This commit is contained in:
parent
001c61d17d
commit
44b9f98ed2
@ -1,11 +1,10 @@
|
|||||||
function g_traceback {
|
function g_traceback {
|
||||||
local deptn=${#FUNCNAME[@]}
|
local deptn=${#FUNCNAME[@]}
|
||||||
|
for ((i=1; i<$deptn; i++)); do
|
||||||
for ((i=1; i<$deptn; i++)); do
|
local func="${FUNCNAME[$i]}"
|
||||||
local func="${FUNCNAME[$i]}"
|
local line="${BASH_LINENO[$((i-1))]}"
|
||||||
local line="${BASH_LINENO[$((i-1))]}"
|
local src="${BASH_SOURCE[$((i-1))]}"
|
||||||
local src="${BASH_SOURCE[$((i-1))]}"
|
printf '%*s' $i '' # indent
|
||||||
printf '%*s' $i '' # indent
|
echo "at: $func, $src, line $line" 1>&2
|
||||||
echo "at: $func(), $src, line $line"
|
done
|
||||||
done
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user