Request for review: Rework cause-chaining in Exceptions was:JDK 8 code review request for 6380161 (reflect) Exception from newInstance() not chained to cause.
joe.darcy at oracle.com
joe.darcy at oracle.com
Wed Aug 17 01:11:04 UTC 2011
Hello.
On 8/14/2011 11:17 PM, Sebastian Sickelmann wrote:
> Hi,
>
> some time ago, i wrote[5] with Joe and David about advancing some
> exception-types to the 4 standard ctors.
>
> The first Exception i have looked at was InternalError and now(after
> some struggeling with gnumake and hg) my patches for reviewing are ready.
>
> I uploaded them at [4]
>
> I split the changes into 3 parts.
>
> 1. Added 2 ctors to InternalError and VirtualMachineError****[1]
> 2. Use the two ctors of InternalError****[2] (based on [1])
> 3. Chain Rootcause into InternalError**[3] (based also on [1])
>
> I think part 1 and 2 are uncritical. Part 3 is more critical because
> it changes behavior (exception-chaining). But i don't think that part
> 3 is unimportable, because in case of an InternalError (use should not
> be able to recover) there shouldn't be a problem with a little longer
> exception-chain.
>
> Is there someone who what to sponsor this or parts of it?
>
> [1] https://bugs.openjdk.java.net/attachment.cgi?id=233
> [2] https://bugs.openjdk.java.net/attachment.cgi?id=234
> [3] https://bugs.openjdk.java.net/attachment.cgi?id=235
> [4] https://bugs.openjdk.java.net/show_bug.cgi?id=100201
> [5]
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-August/007304.html
>
I am willing to sponsor this work and I've filed bug 7080020 "Add
conventional constructors to InternalError" for it.
For adding constructors to InternalError (or VirtualMachineError), the
push that adds the constructors should include some usage of them.
Therefore, at least portions of 1) and 2) above should be combined. If
there are easy to find usages of a cause for VirtualMachineError, then
those should be included at the same time any new constructors are added
there.
There is some currently Oracle-internal paperwork which needs to be
filed to make an API change; I'll file that paperwork once there is
verification on whether updates to both InternalError and
VirtualMachineError will be included in this round of work. The
paperwork needs to be approved before the change is pushed and typically
takes a few days to be processed.
Cheers,
-Joe
More information about the core-libs-dev
mailing list