HomeFreeBSD

lualoader: Actually re-raise error in try_include

Description

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').

Details

Provenance
kevansAuthored on
Parents
rS331563: lualoader: Implement try_include and use it for including the local module
Branches
Unknown
Tags
Unknown