MMS-Projects / copyit-app

This repository contains the desktop and Android app of CopyIt
http://copyit.dev.mms-projects.net/
4 stars 2 forks source link

Catch SWTError caused by non existing browser handle #32

Closed Marlinc closed 11 years ago

Marlinc commented 11 years ago

If no Firefox handle is available or libwebkitgtk-1.0-0 is not installed (on Ubuntu) SWT throws a exception. This can be fixed by asking the user to install a dependency.

Exception in thread "main" org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)])
    at org.eclipse.swt.SWT.error(Unknown Source)
    at org.eclipse.swt.SWT.error(Unknown Source)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at net.mms_projects.copyit.ui.SwtGui.open(Unknown Source)
    at net.mms_projects.copyit.app.CopyItDesktop.run(Unknown Source)
    at net.mms_projects.copyit.app.CopyItDesktop.main(Unknown Source)
Caused by: org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
    at org.eclipse.swt.SWT.error(Unknown Source)
    at org.eclipse.swt.browser.Mozilla.initMozilla(Unknown Source)
    at org.eclipse.swt.browser.Mozilla.create(Unknown Source)
    at org.eclipse.swt.browser.Browser.<init>(Unknown Source)
    at net.mms_projects.copyit.ui.swt.forms.login_dialogs.AutoLoginDialog.createContents(Unknown Source)
    at net.mms_projects.copyit.ui.swt.forms.login_dialogs.AutoLoginDialog.open(Unknown Source)
    at net.mms_projects.copyit.ui.swt.forms.PreferencesDialog$LoginSectionAdapter.widgetSelected(Unknown Source)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at net.mms_projects.copyit.ui.swt.forms.PreferencesDialog.open(Unknown Source)
    at net.mms_projects.copyit.ui.swt.TrayEntryUnity$4.run(Unknown Source)
    at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
    ... 6 more