summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2016-05-30 14:07:40 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2016-05-30 14:07:40 +0100
commit48e569fb7e8994ce6d6df2b16e15c6e1ead7b55b (patch)
tree01feaa139eaa35cd23a77bef0e5c5db3a051dcea
parent6c1de86b2c407cd25897e35e7790723f4694b5a4 (diff)
downloadsupple-48e569fb7e8994ce6d6df2b16e15c6e1ead7b55b.tar.gz
Change return ABI for supple.host.run()
-rw-r--r--lib/supple/host.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/supple/host.lua b/lib/supple/host.lua
index 9f0e016..0ebe981 100644
--- a/lib/supple/host.lua
+++ b/lib/supple/host.lua
@@ -95,6 +95,11 @@ end
-- @tparam string codestr The code to run in the sandbox, as a string.
-- @tparam string codename The name to give to the code running in the sandbox.
-- @param[opt] ... Arguments to pass to the code running in the sandbox.
+-- @treturn[1] boolean A value which has 'truth'
+-- @return[1] ... The results returned from running the code in the sandbox.
+-- @treturn[2] boolean A value which has 'falsehood'
+-- @treturn[2] string The basic Lua error message associated with the failure
+-- @treturn[2] string The Supple traceback (very large, not useful for users)
-- @function run
local function run_sandbox(codestr, codename, ...)
@@ -154,7 +159,7 @@ local function run_sandbox(codestr, codename, ...)
if ok then
return ok, unpack(ret)
else
- return ok, err .. "\n\nHost comms track:\n" .. track.stop()
+ return ok, err, track.stop()
end
end