better error handling
This commit is contained in:
parent
da804b5b05
commit
979369e10b
|
@ -35,7 +35,12 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
ServerSocket serverSocket;
|
||||
try {
|
||||
serverSocket = new ServerSocket(PROXY_PORT, 1);
|
||||
} catch (IOException e) {
|
||||
FileLog.MAIN.logException("Error binding server socket", e);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
// Wait for a connection
|
||||
final Socket clientSocket = serverSocket.accept();
|
||||
|
|
|
@ -114,6 +114,7 @@ public enum FileLog {
|
|||
|
||||
public void logException(String msg, Throwable e) {
|
||||
logLine(msg + e);
|
||||
log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue