diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2015-10-29 12:27:05 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2015-10-29 12:27:05 +0100 |
commit | 621c0d15963cac3519b4dce7b14fbf63c7d2761b (patch) | |
tree | f7951b4229bf4995e78697a7a423b22eb46dcd1c /pdf-over-gui/src/main | |
parent | eb101afe6ae2e8ce4eea05cdd35f8362d960401d (diff) | |
download | pdf-over-621c0d15963cac3519b4dce7b14fbf63c7d2761b.tar.gz pdf-over-621c0d15963cac3519b4dce7b14fbf63c7d2761b.tar.bz2 pdf-over-621c0d15963cac3519b4dce7b14fbf63c7d2761b.zip |
Mobile BKU error handling improved
Diffstat (limited to 'pdf-over-gui/src/main')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java | 9 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java | 4 |
2 files changed, 11 insertions, 2 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 be7464fc..1a796565 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 @@ -75,6 +75,15 @@ public class ATrustHandler extends MobileBKUHandler { public void handleSLRequestResponse(String responseData) throws Exception { ATrustStatus status = getStatus(); + if (responseData.contains("<sl:ErrorResponse")) { //$NON-NLS-1$ + String errorCode = MobileBKUHelper.extractTag(responseData, + "<sl:ErrorCode>", "</sl:ErrorCode>"); //$NON-NLS-1$ //$NON-NLS-2$ + String errorMsg = MobileBKUHelper.extractTag(responseData, + "<sl:Info>", "</sl:Info>"); //$NON-NLS-1$ //$NON-NLS-2$ + throw new Exception("Error from mobile BKU: " + //$NON-NLS-1$ + errorCode + " - " + errorMsg); //$NON-NLS-1$ + } + // Extract infos: String sessionID = MobileBKUHelper.extractTag(responseData, "identification.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java index 5e96366f..05746c7c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java @@ -69,10 +69,10 @@ public class MobileBKUHelper { return data.substring(startidx, endidx); } log.error("extracting Tag: end tag not valid!: " + start + " ... " + end); //$NON-NLS-1$//$NON-NLS-2$ - throw new Exception("end tag not available!"); //$NON-NLS-1$ + throw new Exception("end tag not available! Mobile BKU site changed?"); //$NON-NLS-1$ } log.error("extracting Tag: start tag not valid!: " + start + " ... " + end); //$NON-NLS-1$//$NON-NLS-2$ - throw new Exception("start tag not available!"); //$NON-NLS-1$ + throw new Exception("start tag not available! Mobile BKU site changed?"); //$NON-NLS-1$ } /** |