HomeFreeBSD

MFC r339849: lualoader: Fix try_include error handling

Description

MFC r339849: 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.

Approved by: re (gjb)

Details

Provenance
kevansAuthored on
Parents
rS340011: MFC r339688:
Branches
Unknown
Tags
Unknown