mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
16 lines
370 B
Lua
16 lines
370 B
Lua
--- Core module
|
|
-- @module Core
|
|
|
|
Core = {} --luacheck: allow defined top
|
|
|
|
--- Errors if the variable evaluates to false, with an optional msg
|
|
-- @param var variable to evaluate
|
|
-- @tparam[opt='missing value'] string msg message
|
|
function Core.fail_if_missing(var, msg)
|
|
if not var then
|
|
error(msg or "Missing value", 3)
|
|
end
|
|
return false
|
|
end
|
|
|
|
return Core |