MCPcopy Create free account
hub / github.com/DFHack/dfhack / handle_error

Function handle_error

plugins/luasocket.cpp:65–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 return std::make_pair(sock,target);
64}
65void handle_error(CSimpleSocket::CSocketError err,bool skip_timeout=true)
66{
67 if (err == CSimpleSocket::SocketSuccess)
68 return;
69 if (err == CSimpleSocket::SocketTimedout && skip_timeout)
70 return;
71 if (err == CSimpleSocket::SocketEwouldblock && skip_timeout)
72 return;
73 throw std::runtime_error(CSimpleSocket::DescribeError(err));
74}
75static int lua_socket_bind(std::string ip,int port)
76{
77 static int server_id=0;

Callers 3

lua_socket_bindFunction · 0.85
lua_server_acceptFunction · 0.85
lua_client_receiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected