Author: dgolovin
Date: 2012-01-31 21:25:55 -0500 (Tue, 31 Jan 2012)
New Revision: 38347
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
Fixed exception handling
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-02-01
01:34:33 UTC (rev 38346)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-02-01
02:25:55 UTC (rev 38347)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.browsersim.ui;
import java.awt.Desktop;
+import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
@@ -305,9 +306,11 @@
try {
URL url = new URL(skin.getBrowser().getUrl()); // validate URL (to do not open
'about:blank' and similar)
Desktop.getDesktop().browse(url.toURI());
- } catch (Exception e1) {
+ } catch (IOException e1) {
showErrorMessage(skin.getShell(),
Messages.BrowserSim_COULD_NOT_OPEN_DEFAULT_BROWSER + e1.getMessage());
- }
+ } catch (URISyntaxException e2) {
+ showErrorMessage(skin.getShell(),
Messages.BrowserSim_COULD_NOT_OPEN_DEFAULT_BROWSER + e2.getMessage());
+ }
}
});
}
Show replies by date