summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-14 13:32:54 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-14 13:32:54 +0200
commitb98014180f2ef9f4adc7b8a1a66aa7215482f788 (patch)
tree952e9aee49b510defbcb374d75d477a5327c668b /pdf-over-gui/src/main/java/at
parentbf04fba3b1ff92b4288c37c474c8e4b9d4e2e342 (diff)
downloadpdf-over-b98014180f2ef9f4adc7b8a1a66aa7215482f788.tar.gz
pdf-over-b98014180f2ef9f4adc7b8a1a66aa7215482f788.tar.bz2
pdf-over-b98014180f2ef9f4adc7b8a1a66aa7215482f788.zip
add error message for failing to connect (cf. #47)
Diffstat (limited to 'pdf-over-gui/src/main/java/at')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index 594e46c8..aee5827f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -16,6 +16,7 @@
package at.asit.pdfover.gui.workflow.states;
import java.io.InputStream;
+import java.net.ConnectException;
import java.net.UnknownHostException;
import java.util.Timer;
import java.util.TimerTask;
@@ -170,6 +171,9 @@ public class MobileBKUState extends State {
{
log.error("Failed to resolve hostname", e);
message = String.format(Messages.getString("error.CouldNotResolveHostname"), e.getMessage());
+ } else if (e instanceof ConnectException) {
+ log.error("Failed to connect", e);
+ message = String.format(Messages.getString("error.FailedToConnect"), e.getMessage());
} else {
message = Messages.getString("error.Unexpected");
log.error(message, e);