some bug fix
This commit is contained in:
1 parent
9aa7244824
commit
e93a3b9ed6
3 files changed
+9
-6
No files matched your search
+4
-1
@@ -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