|
|
@ -273,6 +273,7 @@ function uninstall { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function populate_error_arrays { |
|
|
function populate_error_arrays { |
|
|
|
|
|
|
|
|
local source=$1 line=$2 payload=$3 |
|
|
local source=$1 line=$2 payload=$3 |
|
|
unset 'error_source[0]' 'error_lineno[0]' 'error_funcname[0]' |
|
|
unset 'error_source[0]' 'error_lineno[0]' 'error_funcname[0]' |
|
|
unset 'error_source[-1]' 'error_lineno[-1]' 'error_funcname[-1]' |
|
|
unset 'error_source[-1]' 'error_lineno[-1]' 'error_funcname[-1]' |
|
|
@ -489,6 +490,7 @@ function on_exit { |
|
|
|
|
|
|
|
|
load_tmp_error |
|
|
load_tmp_error |
|
|
|
|
|
|
|
|
|
|
|
if [[ $failure_code -gt 0 ]]; then |
|
|
if [[ -v failure_type && "$failure_type" == 'RETURN' ]]; then |
|
|
if [[ -v failure_type && "$failure_type" == 'RETURN' ]]; then |
|
|
last_error="${tmp_error[-1]}" |
|
|
last_error="${tmp_error[-1]}" |
|
|
regex='^(.*): line ([0-9]+): miaou_error: RETURN [0-9]+' |
|
|
regex='^(.*): line ([0-9]+): miaou_error: RETURN [0-9]+' |
|
|
@ -520,7 +522,7 @@ function on_exit { |
|
|
miaou_debug "<child_error change_stderr count=${#tmp_error[@]}/>" |
|
|
miaou_debug "<child_error change_stderr count=${#tmp_error[@]}/>" |
|
|
|
|
|
|
|
|
elif [[ ! -v failure_type ]]; then |
|
|
elif [[ ! -v failure_type ]]; then |
|
|
if [[ $failure_code -gt 0 && ${#tmp_error[@]} -gt 0 ]]; then |
|
|
|
|
|
|
|
|
if [[ ${#tmp_error[@]} -gt 0 ]]; then |
|
|
last_error="${tmp_error[-1]}" |
|
|
last_error="${tmp_error[-1]}" |
|
|
miaou_debug "<investigate_tmp_error last={$last_error}>" |
|
|
miaou_debug "<investigate_tmp_error last={$last_error}>" |
|
|
|
|
|
|
|
|
@ -563,7 +565,8 @@ function on_exit { |
|
|
miaou_debug "</investigate_tmp_error>" |
|
|
miaou_debug "</investigate_tmp_error>" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
miaou_debug '<dump>' |
|
|
if ! is_true $CHILD_PROCESS; then |
|
|
if ! is_true $CHILD_PROCESS; then |
|
|
2>&3 >&3 dump_stderr |
|
|
2>&3 >&3 dump_stderr |
|
|
if [[ -v failure_type && $failure_code -gt 0 ]]; then |
|
|
if [[ -v failure_type && $failure_code -gt 0 ]]; then |
|
|
@ -575,6 +578,7 @@ function on_exit { |
|
|
elif [[ -v failure_type ]]; then |
|
|
elif [[ -v failure_type ]]; then |
|
|
2>&3 >&4 save_err_trace_to_main |
|
|
2>&3 >&4 save_err_trace_to_main |
|
|
fi |
|
|
fi |
|
|
|
|
|
miaou_debug '</dump>' |
|
|
|
|
|
|
|
|
if [[ $failure_code -gt 0 ]]; then |
|
|
if [[ $failure_code -gt 0 ]]; then |
|
|
miaou_debug "</on_exit code=$failure_code>" |
|
|
miaou_debug "</on_exit code=$failure_code>" |
|
|
|