diff --git a/bin/bash-back b/bin/bash-back index 710a6e9..1851702 100755 --- a/bin/bash-back +++ b/bin/bash-back @@ -20,6 +20,10 @@ function on_return { # overridden function which permits stacktracing of original `return` statement function exit { code=${1:-0} + + # TODO: prefer this output, but change the exit case scenario message in stacktrace first! + # >&2 echo "${BASH_SOURCE[2]}:${BASH_LINENO[0]} exit $@" + >&2 echo "${BASH_SOURCE[2]}: line ${BASH_LINENO[0]}: exit $@" builtin exit $code } diff --git a/lib/utility.bash b/lib/utility.bash index 7583c91..32eee46 100644 --- a/lib/utility.bash +++ b/lib/utility.bash @@ -4,10 +4,10 @@ function blabla { } function suite { - # exit 0 - return 7 + exit 10 # youpi + exit echo $nope - exit 10 - return command_not_found + return 7 + return }