summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:18:22 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:18:22 +0000
commit14ebaf2a3db09aa95029e985f0146b8db013764e (patch)
treec28abab411b9e7b9758c44144e65f50636c7470f /pdf-over-gui/src/main/java/at/asit
parent77531710fb5bd3d01e97f70da4158109a4de3f82 (diff)
downloadpdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.tar.gz
pdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.tar.bz2
pdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.zip
Display error if unable to load SWT lib
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@245 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java2
2 files changed, 8 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 42a811be..c84f28cf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
index 7cefb857..7839ed16 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
+++ b/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$
}
/**