Page MenuHomeFreeBSD

lualoader: provide loader.exit()
Needs ReviewPublic

Authored by kevans on Nov 2 2019, 4:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 25, 8:15 AM
Unknown Object (File)
Jan 21 2025, 4:24 AM
Unknown Object (File)
Jan 19 2025, 9:58 PM
Unknown Object (File)
Nov 4 2024, 9:53 AM
Unknown Object (File)
Oct 4 2024, 9:56 PM
Unknown Object (File)
Sep 18 2024, 7:40 PM
Unknown Object (File)
Sep 18 2024, 4:08 PM
Unknown Object (File)
Sep 8 2024, 10:02 AM

Details

Summary

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

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