Revision: 654
http://svn.sourceforge.net/magicmap/?rev=654&view=rev
Author: anweiss
Date: 2007-05-30 07:44:25 -0700 (Wed, 30 May 2007)
Log Message:
-----------
made a new error message for unkown host exceptions
Modified Paths:
--------------
trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java 2007-05-30 14:30:00 UTC (rev 653)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainFrame.java 2007-05-30 14:44:25 UTC (rev 654)
@@ -10,6 +10,7 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.rmi.RemoteException;
+import java.rmi.UnknownHostException;
import javax.swing.AbstractAction;
import javax.swing.JButton;
@@ -330,16 +331,33 @@
this.statusBar.setMessage(GUIUtils.i18n(GUIConstants.STATE_DISCONNECTED));
this.statusBar.setInvisible(Controller.getInstance().isInvisible());
+ if (((AxisFault) e).getMessage().contains("UnknownHostException")) {
+ if (GUIUtils.showConnectError("UnknownHost")) {
+ connect();
+ return;
+ } else {
+ this.connectAction.actionPerformed(new ActionEvent(this, 0, ""));
+ return;
+ }
+ } else {
+ this.connectAction.actionPerformed(new ActionEvent(this, 0, ""));
+ }
if (e instanceof AxisFault) {
AxisFault f = (AxisFault) e;
- if (GUIUtils.showAuthentificationError(f.getFaultString()))
+ if (GUIUtils.showAuthentificationError(f.getFaultString())) {
connect();
- else
+ return;
+ } else {
this.connectAction.actionPerformed(new ActionEvent(this, 0, ""));
- } else if (e instanceof RemoteException) if (GUIUtils.showConnectError())
- connect();
- else
- this.connectAction.actionPerformed(new ActionEvent(this, 0, ""));
+ }
+ } else if (e instanceof RemoteException) {
+ if (GUIUtils.showConnectError()) {
+ connect();
+ return;
+ } else {
+ this.connectAction.actionPerformed(new ActionEvent(this, 0, ""));
+ }
+ }
}
/* (non-Javadoc)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|