before ansi_error

This commit is contained in:
pvincent
2026-07-21 11:33:25 +04:00
parent 8900be5c8b
commit 938abbb3ce
+13 -11
View File
@@ -8,7 +8,15 @@ stack_sources=('file.bash' './lib/utility.bash' 'file.bash')
stack_lines=(18 56 12)
stack_functions=('f2' 'f1' '<main>')
function dump_failure {
function ansi_block_continuation {
tput sc
tput cuu 1
BG=RED FG=BLACK style_ansi "\t╦"
tput rc
FG=RED style_ansi "\t║\n"
}
function ansi_block_error {
BG=RED
FG=BLACK
PADDING=2
@@ -21,15 +29,8 @@ function dump_failure {
ansi_reset
}
function dump_traces {
function ansi_traces {
local optional location
# block continuation
tput sc
tput cuu 1
BG=RED FG=BLACK style_ansi "\t╦"
tput rc
FG=RED style_ansi "\t║\n"
optional=false
for i in "${!stack_sources[@]}"; do
@@ -43,5 +44,6 @@ function dump_traces {
done
}
dump_failure
dump_traces
ansi_block_error
ansi_block_continuation
ansi_traces