From 48e569fb7e8994ce6d6df2b16e15c6e1ead7b55b Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 30 May 2016 14:07:40 +0100 Subject: Change return ABI for supple.host.run() --- lib/supple/host.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1