Date: Mon, 26 Mar 2018 19:06:25 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331564 - head/stand/lua Message-ID: <201803261906.w2QJ6PSW074785@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Mar 26 19:06:25 2018 New Revision: 331564 URL: https://svnweb.freebsd.org/changeset/base/331564 Log: 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'). Modified: head/stand/lua/core.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Mon Mar 26 19:01:22 2018 (r331563) +++ head/stand/lua/core.lua Mon Mar 26 19:06:25 2018 (r331564) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803261906.w2QJ6PSW074785>