RFR: 8287397 : Print top-level exception when snippet fails to read file
Jonathan Gibbons
jjg at openjdk.org
Sat Nov 12 14:02:34 UTC 2022
On Sun, 22 May 2022 06:28:39 GMT, Anthony Vanelverdinghe <duke at openjdk.org> wrote:
> When using a snippet as follows (on Windows): `{@snippet file=baz\Baz.java }`, javadoc prints the error:
>
> src\foo\foo\Foo.java:14: error: Error reading file: baz\Baz.java
> {@snippet file=baz\Baz.java }
> ^
> (null)
>
>
> which is unhelpful. So rather than printing the exception's cause (which is `null` in the example above), it seems better to print the top-level exception itself.
>
> PS: I'll need help from someone to create a JBS issue & sponsor this PR
Marked as reviewed by jjg (Reviewer).
Filed: https://bugs.openjdk.java.net/browse/JDK-8287397
@anthonyvdotbe You need to change the PR summary by inserting `8287397` (the JBS issue number) at the beginning.
8287397 : Print top-level exception when snippet fails to read file
Note you should verify all javadoc tests pass after making the change.
-------------
PR: https://git.openjdk.org/jdk/pull/8826
More information about the javadoc-dev
mailing list