summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/try.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-05-23 22:21:16 +0800
committerruki <[email protected]>2019-05-23 08:07:37 +0800
commit7434ac208724ea5840e32040fda9601feb4dd722 (patch)
tree01354815e47eb7dd2e57909024432d57576a81ef /xmake/core/sandbox/modules/try.lua
parentaf7907d7adc0c60930477730876f0ed74d3a9f5a (diff)
translate path for gcc and cl
Diffstat (limited to 'xmake/core/sandbox/modules/try.lua')
-rw-r--r--xmake/core/sandbox/modules/try.lua23
1 files changed, 22 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/try.lua b/xmake/core/sandbox/modules/try.lua
index cf0098375..b0b940be2 100644
--- a/xmake/core/sandbox/modules/try.lua
+++ b/xmake/core/sandbox/modules/try.lua
@@ -86,7 +86,28 @@ function sandbox_try._traceback(errors)
return results
end
--- try
+-- local ok = try
+-- {
+-- function ()
+-- raise("errors")
+-- raise({errors = "xxx", xxx = "", yyy = ""})
+-- return true
+-- end,
+-- catch
+-- {
+-- function (errors)
+-- print(errors)
+-- if errors then
+-- print(errors.xxx)
+-- end
+-- end
+-- },
+-- finally
+-- {
+-- function (ok, result_or_errors)
+-- end
+-- }
+-- }
function sandbox_try.try(block)
-- get the try function