RFR: 8253660: Need better error report when artifact resolution fails in AotCompiler.java
Erik Joelsson
erikj at openjdk.java.net
Fri Sep 25 20:44:19 UTC 2020
In AotCompiler.java, if artifact resolution fails, we have no way of diagnosing the error. This patch improves the
default toString() of ArtifactResolverException to automatically include the toString() method of the root cause. It
also adds stack trace printing specifically in AotCompiler.java.
I also found a similar issue in PKCS11Test, and fixed it by adding the ArtifactResolverException there as cause for the
RuntimeException being thrown. This causes the stack trace to be printed on failure.
I looked through all other uses of ArtifactResolver, but they are handling the exception in a way that already prints
the stack trace.
-------------
Commit messages:
- Add cause to RuntimeException in PKCS11Test
- Include root cause message in ArtifactResolverException by default. Print stack trace in AotCotCompiler.
Changes: https://git.openjdk.java.net/jdk/pull/368/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=368&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253660
Stats: 14 lines in 3 files changed: 13 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/368.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/368/head:pull/368
PR: https://git.openjdk.java.net/jdk/pull/368
More information about the build-dev
mailing list