From 0b663afa4d0167df1e838e1f37bb5862e8951037 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 15 Oct 2014 18:07:20 +0200 Subject: PDF-AS Errorhandling redesign only PDFASError Exceptions are returned ! --- .../src/main/java/at/gv/egiz/pdfas/wrapper/PdfAsObject.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pdf-as-legacy/src/main') diff --git a/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/wrapper/PdfAsObject.java b/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/wrapper/PdfAsObject.java index ac76a56b..2412b8cd 100644 --- a/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/wrapper/PdfAsObject.java +++ b/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/wrapper/PdfAsObject.java @@ -115,6 +115,11 @@ public class PdfAsObject implements PdfAs { throw new PdfAsException( ErrorCode.SIGNATURE_COULDNT_BE_CREATED, e.getMessage()); + } catch (at.gv.egiz.pdfas.common.exceptions.PDFASError e) { + e.printStackTrace(); + throw new PdfAsException( + ErrorCode.SIGNATURE_COULDNT_BE_CREATED, e.getMessage()); + } } else { throw new PdfAsException(ErrorCode.SIGNATURE_COULDNT_BE_CREATED, @@ -142,7 +147,7 @@ public class PdfAsObject implements PdfAs { } return new VerifyResultsImpl(resultList); - } catch (at.gv.egiz.pdfas.common.exceptions.PdfAsException e) { + } catch (at.gv.egiz.pdfas.common.exceptions.PDFASError e) { throw new PdfAsException(0, e.getMessage()); } } @@ -264,6 +269,11 @@ public class PdfAsObject implements PdfAs { } catch (CertificateException e) { throw new PdfAsException(ErrorCode.SIGNATURE_COULDNT_BE_CREATED, e.getMessage()); + } catch (at.gv.egiz.pdfas.common.exceptions.PDFASError e) { + e.printStackTrace(); + throw new PdfAsException( + ErrorCode.SIGNATURE_COULDNT_BE_CREATED, e.getMessage()); + } } -- cgit v1.2.3