summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/utils.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-22 13:56:04 +0800
committerGitHub <[email protected]>2019-07-22 13:56:04 +0800
commit4fafbae0430e7f9b4a85d280d6fb0efbd2cf35b5 (patch)
tree5d37ad16fcdd6db1c7fa4b2080d20643673439fa /xmake/core/sandbox/modules/utils.lua
parentde065e129a52e21b96104c897216d8b2b77afba6 (diff)
parent145358ba831e7a90f275118a0556787754fe2fa6 (diff)
Merge pull request #503 from OpportunityLiu/dev
Improve error messge
Diffstat (limited to 'xmake/core/sandbox/modules/utils.lua')
-rw-r--r--xmake/core/sandbox/modules/utils.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/sandbox/modules/utils.lua b/xmake/core/sandbox/modules/utils.lua
index a81c84ded..f71d2a72b 100644
--- a/xmake/core/sandbox/modules/utils.lua
+++ b/xmake/core/sandbox/modules/utils.lua
@@ -20,6 +20,7 @@
-- load modules
local io = require("base/io")
+local os = require("base/os")
local utils = require("base/utils")
local colors = require("base/colors")
local option = require("base/option")
@@ -27,7 +28,6 @@ local log = require("base/log")
local try = require("sandbox/modules/try")
local catch = require("sandbox/modules/catch")
local vformat = require("sandbox/modules/vformat")
-local raise = require("sandbox/modules/raise")
-- define module
local sandbox_utils = sandbox_utils or {}
@@ -173,13 +173,13 @@ function sandbox_utils.assert(value, format, ...)
-- check
if not value then
if format ~= nil then
- raise(format, ...)
+ os.raiselevel(2, format, ...)
else
- raise("assertion failed!")
+ os.raiselevel(2, "assertion failed!")
end
end
- -- return it
+ -- return it
return value
end