Skip to content

Commit

Permalink
use warning instead of raise #5541
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 29, 2024
1 parent 87630c8 commit 5926c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xmake/core/tool/toolchain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ end
-- get the program and name of the given tool kind
function _instance:tool(toolkind)
if not self:_is_checked() then
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())
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())
end
-- ensure to do load for initializing toolset first
-- @note we cannot call self:check() here, because it can only be called on config
Expand Down Expand Up @@ -810,7 +810,7 @@ function toolchain.toolconfig(toolchains, name, opt)
if toolconfig == nil then
for _, toolchain_inst in ipairs(toolchains) do
if not toolchain_inst:_is_checked() then
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())
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())
end
local values = toolchain_inst:get(name)
if values then
Expand Down

0 comments on commit 5926c45

Please sign in to comment.