diff options
Diffstat (limited to 'src/ffluci/util.lua')
-rw-r--r-- | src/ffluci/util.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ffluci/util.lua b/src/ffluci/util.lua index 8a526173d7..38f33a20d4 100644 --- a/src/ffluci/util.lua +++ b/src/ffluci/util.lua @@ -36,7 +36,10 @@ function class(base) 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 @@ -138,6 +141,11 @@ function resfenv(f) 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) |