setmetatable(inst, {__index = class})
if inst.__init__ then
- inst:__init__(...)
+ local stat, err = pcall(inst.__init__, inst, ...)
+ if not stat then
+ error(err)
+ end
end
return inst
end
+-- Returns the Haserl unique sessionid
+function sessionid()
+ return ENV.SESSIONID
+end
+
-- Updates the scope of f with "extscope"
function updfenv(f, extscope)
local scope = getfenv(f)
if type(valid) == "function" then
value = valid(value)
elseif type(valid) == "table" then
- if not ffluci.util.contains(valid, value) then
+ if not contains(valid, value) then
value = nil
end
end