Improve error on server socket bind

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@324 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-02-03 21:03:24 +00:00
parent 6fa000b55a
commit d578aa889d
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import org.apache.commons.httpclient.methods.GetMethod;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.BindException;
/**
* DavGateway main class
@ -94,6 +95,8 @@ public class DavGateway {
if (currentVersion != null && releasedVersion != null && currentVersion.compareTo(releasedVersion) < 0) {
DavGatewayTray.info("A new version (" + releasedVersion + ") of DavMail Gateway is available !");
}
} catch (BindException e) {
DavGatewayTray.error("Unable to create server socket: the specified port is in use by another process");
} catch (IOException e) {
DavGatewayTray.error("Exception creating server socket", e);
}