RFR: 8285611: Retrofit (Doc)Pretty with java.io.UncheckedIOException
Pavel Rappo
prappo at openjdk.java.net
Tue Apr 26 08:13:45 UTC 2022
On Mon, 25 Apr 2022 21:01:58 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> Standard `java.io.UncheckedIOException` is more convenient than older ad-hoc `com.sun.tools.javac.tree.(Doc)Pretty.UncheckedIOException`.
Addressing your earlier points after integration.
> 1. To be clear, this is more than just substitution of an equivalent exception: there's a minor change in behavior with respect to the resulting exception that is thrown (i.e. the original.) People may wonder, how did the exception escape, but then again, anyone handling it ought to know.
Right; however, all the important information is still on the stack.
> 2. Do you want to avoid filling in the stack trace, since the unchecked exception is transient? Maybe it's not important, since this code path is almost never taken.
I wouldn't bother; these exceptions don't warrant any future head-scratching.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8387
More information about the compiler-dev
mailing list