On Sun, 22 May 2022 06:28:39 GMT, Anthony Vanelverdinghe <[email protected]>
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
This pull request has now been integrated.
Changeset: 297bf6a5
Author: Anthony Vanelverdinghe <[email protected]>
Committer: Julian Waters <[email protected]>
URL:
https://git.openjdk.org/jdk/commit/297bf6a5965c4f01ca2091976b5e6ca675ab5395
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
8287397: Print top-level exception when snippet fails to read file
Reviewed-by: jjg
-------------
PR: https://git.openjdk.org/jdk/pull/8826