--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Fri Aug 06 08:18:06 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Fri Aug 06 08:39:21 2010 -0500
@@ -3,7 +3,7 @@
AbstractBrowserPortalPage_RefreshLabel=Refresh page
AbstractBrowserPortalPage_StopLabel=Stop loading
AbstractBrowserPortalPageLayer_BadURLError=Could not load page due to bad URL
-AbstractBrowserPortalPageLayer_BrowserCreateError=Could not create browser
+AbstractBrowserPortalPageLayer_BrowserCreateError=Could not create browser: {0}
AbstractBrowserPortalPageLayer_ForwardLabel=Forward
AbstractBrowserPortalPageLayer_InvalidURLError=Invalid URL
AbstractBrowserPortalPageLayer_OpenLocationLabel=Open location
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Fri Aug 06 08:18:06 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Fri Aug 06 08:39:21 2010 -0500
@@ -28,7 +28,6 @@
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.LocationAdapter;
import org.eclipse.swt.browser.LocationEvent;
@@ -137,9 +136,14 @@
composite.setLayout(new FillLayout());
try {
browser = new Browser(composite, SWT.MOZILLA);
- } catch (SWTError e) {
- // don't log with SWTError as Throwable because it displays a dialog and this may occur and be benign
- Activator.logError(MessageFormat.format(Messages.AbstractBrowserPortalPageLayer_BrowserCreateError, e.getMessage()), null);
+ } catch (Throwable e1) {
+ try {
+ // try creating regular browser
+ browser = new Browser(composite, SWT.NONE);
+ } catch (Throwable e2) {
+ // don't log with Throwable directly because it may display a dialog
+ Activator.logError(MessageFormat.format(Messages.AbstractBrowserPortalPageLayer_BrowserCreateError, e2.getMessage()), null);
+ }
}
return composite;