From f471f8da55137d49ae0c7215ebf2a3a29b2e1504 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 15 Oct 2014 18:31:15 +0200 Subject: PDF-AS_WEB Error handling adaptions --- pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 4 ++-- .../src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pdf-as-web/src') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index 0a9a7e5e..3323a252 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -57,7 +57,7 @@ import at.gv.egiz.pdfas.api.ws.PDFASSignParameters; import at.gv.egiz.pdfas.api.ws.PDFASSignParameters.Connector; import at.gv.egiz.pdfas.api.ws.PDFASSignResponse; import at.gv.egiz.pdfas.api.ws.PDFASVerificationResponse; -import at.gv.egiz.pdfas.common.exceptions.PdfAsException; +import at.gv.egiz.pdfas.common.exceptions.PDFASError; import at.gv.egiz.pdfas.lib.api.ByteArrayDataSource; import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.api.PdfAs; @@ -520,7 +520,7 @@ public class PdfAsHelper { } public static byte[] generateVisualBlock(String profile, int resolution) - throws IOException, CertificateException, PdfAsException { + throws IOException, CertificateException, PDFASError { X509Certificate cert = new X509Certificate( PdfAsHelper.class.getResourceAsStream("/qualified.cer")); Configuration config = pdfAs.getConfiguration(); diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java index 3008c25e..1ee6f0f8 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java @@ -12,7 +12,7 @@ import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.gv.egiz.pdfas.common.exceptions.PdfAsException; +import at.gv.egiz.pdfas.common.exceptions.PDFASError; import at.gv.egiz.pdfas.web.helper.PdfAsHelper; public class VisBlockServlet extends HttpServlet { @@ -85,7 +85,7 @@ public class VisBlockServlet extends HttpServlet { } catch (CertificateException e) { logger.error("CERT Error", e); throw new ServletException("Failed to find certificate"); - } catch (PdfAsException e) { + } catch (PDFASError e) { logger.error("PDF_AS Error", e); throw new ServletException("Generic Error"); } -- cgit v1.2.3