On Wed, 4 Jun 2025 07:00:33 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> I don't think so. Let Java catch it. > > ok..but checkReturnValue in ScreenCastHelper.java doesnt handle the exception > for RESULT_ERROR case so it will be left to application to handle and am not > sure if they will expect this internal exception.. So, `AWT_UNLOCK()` clears the exception if it occurs during unlocking, and throws any pending exception if it occurred before entering `AWT_UNLOCK()`. Re-throwing `pendingException` creates a pending exception again… Therefore, the code has to bail out with `RESULT_ERROR` and to let Java deal with that exception. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25605#discussion_r2132347158