some bug fix
This commit is contained in:
@@ -82,16 +82,19 @@ function backtrace
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Execute command outside of error control
|
||||
# Execute command outside of error control, echoes ouput error code
|
||||
noerror()
|
||||
{
|
||||
set +o errexit
|
||||
trap - ERR
|
||||
|
||||
$@
|
||||
local code=$?
|
||||
|
||||
trap "error ${LINENO}" ERR
|
||||
set -o errexit
|
||||
|
||||
echo $code
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user