mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
use traceback
This commit is contained in:
@@ -181,7 +181,7 @@ function suspend(co, result, command)
|
|||||||
session_coroutine_address[co] = nil
|
session_coroutine_address[co] = nil
|
||||||
session_coroutine_tracetag[co] = nil
|
session_coroutine_tracetag[co] = nil
|
||||||
skynet.fork(function() end) -- trigger command "SUSPEND"
|
skynet.fork(function() end) -- trigger command "SUSPEND"
|
||||||
error(debug.traceback(co,tostring(command)))
|
error(traceback(co,tostring(command)))
|
||||||
end
|
end
|
||||||
if command == "SUSPEND" then
|
if command == "SUSPEND" then
|
||||||
dispatch_wakeup()
|
dispatch_wakeup()
|
||||||
@@ -191,12 +191,12 @@ function suspend(co, result, command)
|
|||||||
return
|
return
|
||||||
elseif command == "USER" then
|
elseif command == "USER" then
|
||||||
-- See skynet.coutine for detail
|
-- See skynet.coutine for detail
|
||||||
error("Call skynet.coroutine.yield out of skynet.coroutine.resume\n" .. debug.traceback(co))
|
error("Call skynet.coroutine.yield out of skynet.coroutine.resume\n" .. traceback(co))
|
||||||
elseif command == nil then
|
elseif command == nil then
|
||||||
-- debug trace
|
-- debug trace
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
error("Unknown command : " .. command .. "\n" .. debug.traceback(co))
|
error("Unknown command : " .. command .. "\n" .. traceback(co))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -722,7 +722,7 @@ local function init_template(start, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function skynet.pcall(start, ...)
|
function skynet.pcall(start, ...)
|
||||||
return xpcall(init_template, debug.traceback, start, ...)
|
return xpcall(init_template, traceback, start, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function skynet.init_service(start)
|
function skynet.init_service(start)
|
||||||
@@ -766,7 +766,7 @@ function skynet.task(ret)
|
|||||||
end
|
end
|
||||||
if ret == "init" then
|
if ret == "init" then
|
||||||
if init_thread then
|
if init_thread then
|
||||||
return debug.traceback(init_thread)
|
return traceback(init_thread)
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -780,7 +780,7 @@ function skynet.task(ret)
|
|||||||
elseif tt == "number" then
|
elseif tt == "number" then
|
||||||
local co = session_id_coroutine[ret]
|
local co = session_id_coroutine[ret]
|
||||||
if co then
|
if co then
|
||||||
return debug.traceback(co)
|
return traceback(co)
|
||||||
else
|
else
|
||||||
return "No session"
|
return "No session"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user