summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
index 96530cf0..c9bda35f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
@@ -282,11 +282,22 @@ public class ATrustHandler extends MobileBKUHandler {
state.clearRememberedCredentials();
// extract error text!
try {
- String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "class", "ErrorClass");
- status.errorMessage = errorMessage;
+ String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label1");
+ if (errorMessage.startsWith("Fehler: "))
+ errorMessage = errorMessage.substring(8);
+ status.errorMessage = errorMessage.strip();
} catch (Exception e) {
- throw new SignatureException(MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " +
- MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>"));
+ log.error("Failed to get credentials error message", e);
+ String msg = null;
+ try
+ {
+ msg = MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " +
+ MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>");
+ } catch (Exception e2) {
+ log.error("Failed to get credentials error code", e2);
+ msg = Messages.getString("error.Unexpected");
+ }
+ status.errorMessage = msg.strip();
}
}