Browse Source

subshell error

main
pvincent 2 weeks ago
parent
commit
4a88abbe08
  1. 13
      bin/miaou-bash

13
bin/miaou-bash

@ -142,6 +142,9 @@ function on_exit {
if [[ "${code}" == 128 ]]; then
failure_type='SUBSHELL SOURCE NOT FOUND'
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:2)"
else
failure_type='SUBSHELL ERROR'
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:3)"
fi
else
regex='^pipe error:'
@ -176,9 +179,13 @@ function dump_failure {
if [[ ${failure_type} == 'SUBSHELL SOURCE NOT FOUND' ]]; then
:
else
>&4 echo "CODE: ${code}"
>&4 echo "TYPE: ${failure_type}"
>&4 echo "PAYLOAD: ${failure_payload}"
if [[ $failure_type == 'SUBSHELL ERROR' ]]; then
>&4 echo -e "${failure_payload}"
else
>&4 echo "CODE: ${code}"
>&4 echo "TYPE: ${failure_type}"
>&4 echo "PAYLOAD: ${failure_payload}"
fi
fi
for i in "${failure_traces[@]}"; do
>&4 echo -e "$i"

Loading…
Cancel
Save