import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
-import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.tizen.emulator.skin.EmulatorSkin;
+import org.tizen.emulator.skin.EmulatorSkinMain;
import org.tizen.emulator.skin.comm.ICommunicator;
import org.tizen.emulator.skin.comm.ICommunicator.SendCommand;
import org.tizen.emulator.skin.comm.sock.data.BooleanData;
import org.tizen.emulator.skin.image.ImageRegistry.ResourceImageName;
import org.tizen.emulator.skin.log.SkinLogger;
import org.tizen.emulator.skin.util.IOUtil;
+import org.tizen.emulator.skin.util.SkinUtil;
+import org.tizen.emulator.skin.util.SwtUtil;
/**
*
int port = config.getArgInt(ArgsConstants.VM_SKIN_PORT);
socket = new Socket("127.0.0.1", port);
logger.info("socket.isConnected() : " + socket.isConnected());
- } catch (UnknownHostException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
} catch (IOException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
+ StringBuilder message = new StringBuilder("Error message: "
+ + e.getMessage());
+ if (SwtUtil.isMacPlatform()) {
+ message.append(System.getProperty("line.separator")).append(
+ "Make sure that SOCKS proxy setting is correct.");
+ }
+ SkinUtil.openMessage(
+ skin.getShell(),
+ null,
+ "Emulator UI fails to connect."
+ + System.getProperty("line.separator")
+ + message.toString(), SWT.ICON_ERROR, config);
+ EmulatorSkinMain.terminateImmediately(-1);
}
this.bao = new ByteArrayOutputStream();