Skip to content

Commit 5926c45

Browse files
committed
use warning instead of raise #5541
1 parent 87630c8 commit 5926c45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xmake/core/tool/toolchain.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ end
209209
-- get the program and name of the given tool kind
210210
function _instance:tool(toolkind)
211211
if not self:_is_checked() then
212-
os.raise("we cannot get tool(%s) in toolchain(%s) with %s/%s, because it has been not checked yet!", toolkind, self:name(), self:plat(), self:arch())
212+
utils.warning("we cannot get tool(%s) in toolchain(%s) with %s/%s, because it has been not checked yet!", toolkind, self:name(), self:plat(), self:arch())
213213
end
214214
-- ensure to do load for initializing toolset first
215215
-- @note we cannot call self:check() here, because it can only be called on config
@@ -810,7 +810,7 @@ function toolchain.toolconfig(toolchains, name, opt)
810810
if toolconfig == nil then
811811
for _, toolchain_inst in ipairs(toolchains) do
812812
if not toolchain_inst:_is_checked() then
813-
os.raise("we cannot get toolconfig(%s) in toolchain(%s) with %s/%s, because it has been not checked yet!", name, toolchain_inst:name(), toolchain_inst:plat(), toolchain_inst:arch())
813+
utils.warning("we cannot get toolconfig(%s) in toolchain(%s) with %s/%s, because it has been not checked yet!", name, toolchain_inst:name(), toolchain_inst:plat(), toolchain_inst:arch())
814814
end
815815
local values = toolchain_inst:get(name)
816816
if values then

0 commit comments

Comments
 (0)