subshell error
This commit is contained in:
+10
-3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user