You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I defiend a global function called testfunc in lua, testfunc calls function test through xpcall and passes in a parameter, but the fucntion called with xpcall displays Msg as nil, but pcall is normal
lua code:
function_G.testfunc()
xpcall(test, debug.traceback, "Hello World")
pcall(test, "Hello World")
endfunctiontest(Msg)
ifMsg==nilthenprint("msg is nil")
returnendLogInfo("msg ", Msg)
end
GopherLua v1.1.0
go v1.21.0 linux/amd64
I defiend a global function called testfunc in lua, testfunc calls function test through xpcall and passes in a parameter, but the fucntion called with xpcall displays Msg as nil, but pcall is normal
lua code:
and go code
and the log shows:
The text was updated successfully, but these errors were encountered: