Merge pull request #579 from footer/master

nice error log in skynet coroutine
This commit is contained in:
云风
2017-03-06 15:22:56 +08:00
committed by GitHub

View File

@@ -109,11 +109,11 @@ end
do -- begin skynetco.wrap do -- begin skynetco.wrap
local function wrap_co(ok, ...) local function wrap_co(co, ok, ...)
if ok then if ok then
return ... return ...
else else
error(...) error(debug.traceback(co), 2)
end end
end end
@@ -122,7 +122,7 @@ function skynetco.wrap(f)
return f(...) return f(...)
end) end)
return function(...) return function(...)
return wrap_co(skynetco.resume(co, ...)) return wrap_co(co, skynetco.resume(co, ...))
end end
end end