made nbsrv print errors \o/

This commit is contained in:
Izaya 2017-09-04 02:04:41 +10:00
parent a27e70ad0e
commit e82af803ab

View File

@ -8,7 +8,7 @@ end
local f=io.open(fpath,"rb") local f=io.open(fpath,"rb")
local nbdata = f:read("*a") local nbdata = f:read("*a")
f:close() f:close()
spawn("nbsrv: "..tostring(nport)..","..fpath,function() spawn("nbsrv: "..tostring(nport)..","..fpath,function() print(xpcall(function()
while true do while true do
local _, laddress, raddress, port, _, payload = event.pull("modem_message") local _, laddress, raddress, port, _, payload = event.pull("modem_message")
if port == nport and type(payload) == "string" then if port == nport and type(payload) == "string" then
@ -23,5 +23,5 @@ spawn("nbsrv: "..tostring(nport)..","..fpath,function()
end end
end end
end end
end) end)) end)
print("[nbsrv] nbsrv started.") print("[nbsrv] nbsrv started.")