[jira] [Commented] (PDFBOX-4993) if infile is missing, say which one
[ https://issues.apache.org/jira/browse/PDFBOX-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216672#comment-17216672 ] ASF subversion and git services commented on PDFBOX-4993: - Commit 1882653 from Tilman Hausherr in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1882653 ] PDFBOX-4993: improve exception message, as suggested by Ralf Hauser > 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: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4993) if infile is missing, say which one
[ https://issues.apache.org/jira/browse/PDFBOX-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216671#comment-17216671 ] ASF subversion and git services commented on PDFBOX-4993: - Commit 1882652 from Tilman Hausherr in branch 'pdfbox/trunk' [ https://svn.apache.org/r1882652 ] PDFBOX-4993: improve exception message, as suggested by Ralf Hauser > 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: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org