Page MenuHomeFreeBSD

lualoader: provide loader.exit()
Needs ReviewPublic

Authored by kevans on Sat, Nov 2, 4:48 AM.



After rS354247, we can effectively use a special error to indicate to the caller that we should just return since we have no further special pcall contexts. This may be used by vendors to exit without having to plumb a special value up through local.lua (however they may have it structured) out to try_include and ultimately loader.lua. It may also be used in the future for the escape to loader prompt, ensuring a quick and speedy escape.

The special value is arbitrary, just ensuring we don't collide with any other potential error that may be thrown. Lua only uses strings for errors, so the odds are low of collision anyways. For numeric values that aren't our special value(s), we just print the number rather than declaring the error 'unknown' as we have been.

Diff Detail

rS FreeBSD src repository
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 27317

Event Timeline

kevans created this revision.Sat, Nov 2, 4:48 AM
kevans edited the summary of this revision. (Show Details)Sat, Nov 2, 4:49 AM