Searched hist:"5 beb5507121c66e9af38523735b3a6d94310d8a8" (Results 1 – 1 of 1) sorted by relevance
/freebsd/stand/lua/ |
H A D | core.lua | diff 5beb5507121c66e9af38523735b3a6d94310d8a8 Mon Oct 29 03:58:30 CET 2018 Kyle Evans <kevans@FreeBSD.org> lualoader: Fix try_include error handling
The previous iteration of try_include attempted to be 'friendly' and error() out if we hit an error that wasn't ENOENT. This was semi-OK, but fragile as it relied on pattern matching the error message.
Move the responsibility for handling failure to the caller. Following a common lua pattern, we'll return the return value of the underlying require() on success, or false and an error message.
Reported by: bcran MFC after: 3 days
|