libs/core: Fixed docstrings for luci.util
This commit is contained in:
parent
c5a68895cf
commit
7a08658fe7
1 changed files with 3 additions and 3 deletions
|
@ -519,7 +519,7 @@ local oldpcall, oldxpcall = pcall, xpcall
|
||||||
coxpt = {}
|
coxpt = {}
|
||||||
setmetatable(coxpt, {__mode = "kv"})
|
setmetatable(coxpt, {__mode = "kv"})
|
||||||
|
|
||||||
--- Identity function for copcall
|
-- Identity function for copcall
|
||||||
local function copcall_id(trace, ...)
|
local function copcall_id(trace, ...)
|
||||||
return ...
|
return ...
|
||||||
end
|
end
|
||||||
|
@ -552,7 +552,7 @@ function copcall(f, ...)
|
||||||
return coxpcall(f, copcall_id, ...)
|
return coxpcall(f, copcall_id, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Handle return value of protected call
|
-- Handle return value of protected call
|
||||||
function handleReturnValue(err, co, status, ...)
|
function handleReturnValue(err, co, status, ...)
|
||||||
if not status then
|
if not status then
|
||||||
return false, err(debug.traceback(co, (...)), ...)
|
return false, err(debug.traceback(co, (...)), ...)
|
||||||
|
@ -564,7 +564,7 @@ function handleReturnValue(err, co, status, ...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Resume execution of protected function call
|
-- Resume execution of protected function call
|
||||||
function performResume(err, co, ...)
|
function performResume(err, co, ...)
|
||||||
return handleReturnValue(err, co, coroutine.resume(co, ...))
|
return handleReturnValue(err, co, coroutine.resume(co, ...))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue