[ 
https://issues.apache.org/jira/browse/PDFBOX-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-4993:
------------------------------------
    Description: 
{code}
### Eclipse Workspace Patch 1.0
#P pdfbox
Index: 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
===================================================================
--- 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
        (revision 1882597)
+++ 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
        (working copy)
@@ -98,7 +98,13 @@
     {
         if (inFile == null || !inFile.exists())
         {
-            throw new FileNotFoundException("Document for signing does not 
exist");
+            String err = "Document for signing ";
+            if (null == inFile) {
+               err += "is null";
+            } else {
+               err += "does not exist "+inFile.getAbsolutePath();
+            }
+                       throw new FileNotFoundException(err);
         }
 
         try (PDDocument doc = Loader.loadPDF(inFile);
{code}

  was:
### Eclipse Workspace Patch 1.0
#P pdfbox
Index: 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
===================================================================
--- 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
        (revision 1882597)
+++ 
examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
        (working copy)
@@ -98,7 +98,13 @@
     {
         if (inFile == null || !inFile.exists())
         {
-            throw new FileNotFoundException("Document for signing does not 
exist");
+            String err = "Document for signing ";
+            if (null == inFile) {
+               err += "is null";
+            } else {
+               err += "does not exist "+inFile.getAbsolutePath();
+            }
+                       throw new FileNotFoundException(err);
         }
 
         try (PDDocument doc = Loader.loadPDF(inFile);



> if infile is missing, say which one
> -----------------------------------
>
>                 Key: PDFBOX-4993
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4993
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 2.0.21, 3.0.0 PDFBox
>            Reporter: Ralf Hauser
>            Priority: Minor
>             Fix For: 2.0.22, 3.0.0 PDFBox
>
>
> {code}
> ### Eclipse Workspace Patch 1.0
> #P pdfbox
> Index: 
> examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
> ===================================================================
> --- 
> examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
>       (revision 1882597)
> +++ 
> examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
>       (working copy)
> @@ -98,7 +98,13 @@
>      {
>          if (inFile == null || !inFile.exists())
>          {
> -            throw new FileNotFoundException("Document for signing does not 
> exist");
> +            String err = "Document for signing ";
> +            if (null == inFile) {
> +             err += "is null";
> +            } else {
> +             err += "does not exist "+inFile.getAbsolutePath();
> +            }
> +                     throw new FileNotFoundException(err);
>          }
>  
>          try (PDDocument doc = Loader.loadPDF(inFile);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to