mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Merge pull request #579 from footer/master
nice error log in skynet coroutine
This commit is contained in:
@@ -109,11 +109,11 @@ end
|
||||
|
||||
do -- begin skynetco.wrap
|
||||
|
||||
local function wrap_co(ok, ...)
|
||||
local function wrap_co(co, ok, ...)
|
||||
if ok then
|
||||
return ...
|
||||
else
|
||||
error(...)
|
||||
error(debug.traceback(co), 2)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -122,7 +122,7 @@ function skynetco.wrap(f)
|
||||
return f(...)
|
||||
end)
|
||||
return function(...)
|
||||
return wrap_co(skynetco.resume(co, ...))
|
||||
return wrap_co(co, skynetco.resume(co, ...))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user