diff options
| author | ruki <[email protected]> | 2016-04-23 20:02:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-23 20:02:18 +0800 |
| commit | 48a228f6bb2e4870bf0e4952c0c752ddeae72219 (patch) | |
| tree | 933c64e6834ef2d5a05ebd52eaffb210737b9033 /xmake/core/sandbox/modules/try.lua | |
| parent | 31e930871e159dc022ddd1f7a326fcc120e2fb00 (diff) | |
add iphoneos platform
Diffstat (limited to 'xmake/core/sandbox/modules/try.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/try.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/try.lua b/xmake/core/sandbox/modules/try.lua index 3e21a39df..8a6771e4f 100644 --- a/xmake/core/sandbox/modules/try.lua +++ b/xmake/core/sandbox/modules/try.lua @@ -21,6 +21,7 @@ -- -- load modules +local utils = require("base/utils") local table = require("base/table") local string = require("base/string") local option = require("base/option") @@ -107,8 +108,11 @@ function sandbox_try.try(block) -- run the finally function if funcs and funcs.finally then - funcs.finally() + funcs.finally(utils.ifelse(ok, errors, nil)) end + + -- ok? + return utils.ifelse(ok, errors, nil) end -- return module |
