RFR: 8302491: NoClassDefFoundError omits the original cause of an error [v2]
David Holmes
dholmes at openjdk.org
Mon Feb 20 23:59:26 UTC 2023
On Mon, 20 Feb 2023 23:32:09 GMT, Ilarion Nakonechnyy <inakonechnyy at openjdk.org> wrote:
>> That would be one option. There is a lot of overlap with these two methods. Also I think your new method has to handle this case too:
>>
>> // If new_exception returns a different exception while creating the exception, return null.
>
>> Also I think your new method has to handle this case too
>> / If new_exception returns a different exception while creating the exception, return null.
>
> I'm afraid that in this case ( if I return null ), the original cause again will be missed from the stacktrace.
If `new_exception` returns a different exception then you have already lost that. The `ExceptionInInitializerError` would have been replaced by some other exception object: most likely OOME or even another SOE?
-------------
PR: https://git.openjdk.org/jdk/pull/12566
More information about the hotspot-dev
mailing list