Browse Source

tty failure and stacktrace

main
pvincent 2 weeks ago
parent
commit
dec7a1147f
  1. 12
      poc

12
poc

@ -95,9 +95,7 @@ function dump_stderr {
}
function dump_failure {
miaou_debug --error box--
tty_ansi 94
echo -n "MIAOU_BASH: "
miaou_debug --tty error box--
tty_ansi 95
echo -n "$failure_type"
if [[ -v failure_payload ]]; then
@ -105,10 +103,10 @@ function dump_failure {
echo -n " $failure_payload"
fi
tty_ansi 33
printf "%5i" "$failure_code"
printf "%5s" " $failure_code "
tty_ansi 0
echo
miaou_debug --end of error box--
miaou_debug --end of tty error box--
}
function dump_stacktrace {
@ -130,8 +128,8 @@ function on_exit {
2>&3 >&3 dump_stderr
if [[ -v failure_type ]]; then
2>&3 >&3 dump_failure
2>&3 >&3 dump_stacktrace
2>&3 >/dev/tty dump_failure
2>&3 >/dev/tty dump_stacktrace
fi
miaou_debug "on_exit $code"

Loading…
Cancel
Save