summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-02-22 19:37:55 +0100
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-02-22 19:37:55 +0100
commit25cc00d4c48c867f9c5c82685cb5e747253d1051 (patch)
tree959e7c636d16ba3d913eda1ed21258da0e25fe51 /pdf-over-gui
parent5ba456a7e70f69c901120dbb56e74e16cecb6cfa (diff)
downloadpdf-over-25cc00d4c48c867f9c5c82685cb5e747253d1051.tar.gz
pdf-over-25cc00d4c48c867f9c5c82685cb5e747253d1051.tar.bz2
pdf-over-25cc00d4c48c867f9c5c82685cb5e747253d1051.zip
add workaround for PDF-AS exception handling bug (cf. #52)
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
index e6884fb6..740c7d87 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
@@ -93,6 +93,16 @@ public class SigningState extends State {
}
if(this.threadException != null) {
+ // workaround for PDF-AS nullpointerexception intercepting our IllegalStateException
+ // cf. issue #52
+ // this is a bit of a hack...
+ if (status.getPreviousState() instanceof MobileBKUState)
+ {
+ String mobileBkuError = ((MobileBKUState)status.getPreviousState()).getStatus().getErrorMessage();
+ if (mobileBkuError.equals("cancel"))
+ this.threadException = new SignatureException(new IllegalStateException());
+ }
+
String message = Messages.getString("error.Signatur"); //$NON-NLS-1$
if (this.threadException instanceof SignatureException) {
Throwable cause = this.threadException;