mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
lualoader: Actually re-raise error in try_include
It was previously only printed, but we do actually want to raise it as a full blown error so that things don't look OK when they've actually gone wrong. The second parameter to error, level, is set to 2 here so that the error message reflects the position of the try_include caller, rather than the try_include itself. Example: LUA ERROR: /boot/lua/loader.lua:46: /boot/lua/local.lua:1: attempt to call a nil value (global 'cxcint').
This commit is contained in:
parent
07faaf7815
commit
892b3a5272
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331564
|
@ -56,7 +56,7 @@ function try_include(module)
|
|||
-- configuration will not display 'module not found'. All other errors
|
||||
-- in loading will be printed.
|
||||
if config.verbose or ret:match("^module .+ not found") == nil then
|
||||
print(ret)
|
||||
error(ret, 2)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue