gaboshlib/traceback.sh hinzugefügt
This commit is contained in:
parent
bf4c178ea0
commit
0232c89ede
11
gaboshlib/traceback.sh
Normal file
11
gaboshlib/traceback.sh
Normal file
@ -0,0 +1,11 @@
|
||||
function traceback {
|
||||
local deptn=${#FUNCNAME[@]}
|
||||
|
||||
for ((i=1; i<$deptn; i++)); do
|
||||
local func="${FUNCNAME[$i]}"
|
||||
local line="${BASH_LINENO[$((i-1))]}"
|
||||
local src="${BASH_SOURCE[$((i-1))]}"
|
||||
printf '%*s' $i '' # indent
|
||||
echo "at: $func(), $src, line $line"
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue
Block a user