diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-03-21 15:38:51 +0100 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-03-21 15:38:51 +0100 |
commit | 358d03a7db3bb56aa302c8ce069a52af09300bef (patch) | |
tree | c53b8122815b9ce8abc3519ad548f6aceb38ced2 | |
parent | 00c792b41902bc5b6f065371e686f88ce83b7392 (diff) | |
download | pdf-over-358d03a7db3bb56aa302c8ce069a52af09300bef.tar.gz pdf-over-358d03a7db3bb56aa302c8ce069a52af09300bef.tar.bz2 pdf-over-358d03a7db3bb56aa302c8ce069a52af09300bef.zip |
improve error logging/handling for SWT to diagnose display-related bug in release builds
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java | 8 | ||||
-rw-r--r-- | pdf-over-gui/src/main/resources/logback.xml | 6 |
2 files changed, 5 insertions, 9 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 b75b4ebd..1cb55800 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 @@ -19,6 +19,8 @@ package at.asit.pdfover.gui; import java.io.File; import java.io.IOException; +import javax.swing.JOptionPane; + import at.asit.pdfover.commons.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,11 +62,11 @@ public class Main { } catch (Throwable e) { - log.error("Error occured " + e.getMessage()); //$NON-NLS-1$ + log.error("Unhandled error", e); //$NON-NLS-1$ - /*JOptionPane.showMessageDialog(null, + JOptionPane.showMessageDialog(null, "Error occured " + e.getMessage(), //$NON-NLS-1$ - null, JOptionPane.ERROR_MESSAGE);*/ + null, JOptionPane.ERROR_MESSAGE); } // Workaround for remaining AWT-Shutdown thread on OSX diff --git a/pdf-over-gui/src/main/resources/logback.xml b/pdf-over-gui/src/main/resources/logback.xml index ab81e795..084be6f9 100644 --- a/pdf-over-gui/src/main/resources/logback.xml +++ b/pdf-over-gui/src/main/resources/logback.xml @@ -1,10 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Built in 2022-02-17 04:16 by logback-translator --> -<!-- --> -<!-- For sponsoring SLF4J/logback/reload4j projects see --> -<!-- https://github.com/sponsors/qos-ch --> -<!-- --> <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> @@ -13,7 +8,6 @@ </encoder> </appender> <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> - <!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> <file>${user.home}/.pdf-over/pdf-over.log</file> <encoder> <charset>UTF-8</charset> |