summaryrefslogtreecommitdiff
path: root/pdf-over-signer
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-signer')
-rw-r--r--pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
index c7be135f..561452a4 100644
--- a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
+++ b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
@@ -160,8 +160,9 @@ public class PdfAs4Signer {
Throwable rootCause = e;
while (rootCause.getCause() != null)
rootCause = rootCause.getCause();
- try { /* error code 6001 is user cancellation */
- if (((SLPdfAsException)rootCause).getMessage().startsWith("6001 :"))
+ try { /* error code 60xx is user cancellation */
+ int errorCode = Integer.parseInt(((SLPdfAsException)rootCause).getMessage().split(":",2)[0].trim());
+ if ((6000 <= errorCode) && (errorCode <= 6099))
throw new UserCancelledException();
} catch (ClassCastException e2) { /* fall through to wrapped throw */}
}