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
@ -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…
x
Reference in New Issue
Block a user