Better error visibility in multiMiner
This commit is contained in:
@@ -89,7 +89,7 @@ local function hijackTurtle(remoteId)
|
|||||||
local socket, msg = Socket.connect(remoteId, 188)
|
local socket, msg = Socket.connect(remoteId, 188)
|
||||||
|
|
||||||
if not socket then
|
if not socket then
|
||||||
error(msg)
|
error(msg, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
socket:write('turtle')
|
socket:write('turtle')
|
||||||
@@ -101,7 +101,7 @@ local function hijackTurtle(remoteId)
|
|||||||
socket:write({ method, ... })
|
socket:write({ method, ... })
|
||||||
local resp = socket:read()
|
local resp = socket:read()
|
||||||
if not resp then
|
if not resp then
|
||||||
error('timed out: ' .. method)
|
error('T/O: ' .. method, 0)
|
||||||
end
|
end
|
||||||
return table.unpack(resp)
|
return table.unpack(resp)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user