Page MenuHomeFreeBSD

lualoader: handle local module errors more gracefully
Needs ReviewPublic

Authored by kevans on Feb 12 2021, 10:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 19, 9:36 AM
Unknown Object (File)
Mon, Aug 17, 3:25 AM
Unknown Object (File)
Sat, Aug 15, 3:49 PM
Unknown Object (File)
Wed, Aug 12, 5:53 PM
Unknown Object (File)
Sun, Aug 9, 12:09 AM
Unknown Object (File)
Sat, Aug 8, 9:24 PM
Unknown Object (File)
Fri, Aug 7, 11:33 AM
Unknown Object (File)
Sat, Aug 1, 8:39 AM
Subscribers
None

Details

Summary

Load the module and call it in protected mode so that we can bubble
up errors rather than breaking the system further.

Note that we cannot make any guarantees about the state of the
environment if an error occurred; changes may have still been partially
applied depending on the shape/size/position of the error.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36948
Build 33837: arc lint + arc unit

Event Timeline

kevans created this revision.

pcall(loadfile(...)) -> pcall(dofile, ...) to return a more useful error if
chunk loading happens to fail.