diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2012-11-08 20:23:17 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2012-11-08 20:23:17 +0100 |
commit | 6e7e14c0c4016e72f42afc1dc6bbd6fe8196bbe5 (patch) | |
tree | f8820f1d80170486266134cd88b43718c9816381 /trunk/pdf-over-gui/src/main/java/at/asit | |
parent | 01692d8e696807881a533d4a4f8fa1b0394de5e4 (diff) | |
download | pdf-over-6e7e14c0c4016e72f42afc1dc6bbd6fe8196bbe5.tar.gz pdf-over-6e7e14c0c4016e72f42afc1dc6bbd6fe8196bbe5.tar.bz2 pdf-over-6e7e14c0c4016e72f42afc1dc6bbd6fe8196bbe5.zip |
Display error if unable to load SWT lib
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java | 9 | ||||
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java index 42a811be..c84f28cf 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java @@ -18,6 +18,8 @@ package at.asit.pdfover.gui; //Imports import java.io.File; +import javax.swing.JOptionPane; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,8 +45,11 @@ public class Main { try { SWTLoader.loadSWT(); } catch (InitializationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + log.error("Could not load SWT libraries", e); //$NON-NLS-1$ + JOptionPane.showMessageDialog(null, + Messages.getString("error.SWTLib"), //$NON-NLS-1$ + Messages.getString("error.TitleFatal"), //$NON-NLS-1$ + JOptionPane.ERROR_MESSAGE); } File configDir = new File(System.getProperty("user.home")+"/.pdfover"); //$NON-NLS-1$//$NON-NLS-2$ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java index 7cefb857..7839ed16 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java @@ -72,7 +72,7 @@ public class ErrorDialog { this.box = new MessageBox(parent, boxstyle); this.box.setMessage(message); - this.box.setText(Messages.getString("error.title")); //$NON-NLS-1$ + this.box.setText(Messages.getString("error.Title")); //$NON-NLS-1$ } /** |