From 72cb98966c0d631ed4741bf071c621fd36f33fd6 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Fri, 12 Dec 2014 15:38:42 +0100 Subject: Display security layer errors from mobile BKU --- .../java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pdf-over-gui/src/main/java') 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 f19c19bb..7112bd94 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 @@ -33,6 +33,7 @@ import at.asit.pdfover.gui.controls.Dialog.ICON; import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.MobileBKUState; import at.asit.pdfover.signator.SLResponse; +import at.asit.pdfover.signator.SignatureException; /** * A-Trust mobile BKU handler @@ -137,9 +138,13 @@ public class ATrustHandler extends MobileBKUHandler { // error page // extract error text! - String errorMessage = MobileBKUHelper.extractTag(responseData, "", ""); //$NON-NLS-1$ //$NON-NLS-2$ - - status.setErrorMessage(errorMessage); + try { + String errorMessage = MobileBKUHelper.extractTag(responseData, "", ""); //$NON-NLS-1$ //$NON-NLS-2$ + status.setErrorMessage(errorMessage); + } catch (Exception e) { + throw new SignatureException(MobileBKUHelper.extractTag(responseData, "", "") + ": " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + MobileBKUHelper.extractTag(responseData, "", "")); //$NON-NLS-1$ //$NON-NLS-2$ + } // force UI again! status.setMobilePassword(null); -- cgit v1.2.3