Skip to content
Snippets Groups Projects
Commit b99a3541 authored by Igor Munkin's avatar Igor Munkin Committed by Igor Munkin
Browse files

lua: fix loader behaviour in case of syntax error

The patch fixes error handling between module "searching" and "loading"
processes. Originally, if a module is not found, the error message is
returned to <require> and is appended to the "not found" message. If no
suitable module is found, the error is raised by <require>. In case,
when the desired module is found, <require> tries to load it. If any
error occurs while loading the module, the "loader" yields the
corresponding error. The latter part was broken since the commit
5be3a82b ("lua: fix loaders behavior"),
so if the error occurs while loading the module, Tarantool proceeds with
searching the module in other locations.

This bug was found via the lua-Harness suite[1] used in the
tarantool/luajit testing routine, so the test added in the patch
partially duplicates the particular test case in lua-Harness.

[1]: https://fperrad.frama.io/lua-Harness/

Needed for tarantool/tarantool-ee#585

NO_DOC=bugfix
parent 4007552a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment