On Fri, 27 Nov 2026 08:54:11 GMT, Matthias Baesken <[email protected]> wrote:
> > Looks okish but in case the FormatMessage return value is 0, we would not
> > throw the InternalError as before. Shouldn't it still be thrown but maybe
> > with a dummy message?
>
> In the src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp case
> we throw now bad_alloc (already existing `if (createError == NULL) {` case).
> I think this makes sense.
>
> However in the other file this part seems to be missing; not sure if we
> should add it there too?
What does this `throw std::bad_alloc();` mean for the code? Will the whole VM
crash then or will it be translated into an exception? Maybe it is something
for awt_Component.cpp as well.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/34067#issuecomment-7218577444