-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: core-svc
[ThreadReference.popFrames()] and [ThreadReference.forceEarlyReturn()] were previously documented as only throwing `OpaqueFrameException` for virtual threads, indicating that the functionality cannot be performed on the virtual thread frame for a reason that is unique to virtual threads.
However, it was realized that there were error conditions that resulted in a `NativeMethodException` when in fact the underlying error was not due to a native method, and was not unique to virtual threads. The appropriate exception in this case would be an `OpaqueFrameException `instead of a `NativeMethodException.`
Both these APIs have now been updated to be consistent with when these two exceptions are thrown for both virtual threads and platform threads. This means you may now see these two APIs throw `OpaqueFrameException` for a platform thread when previously this was not possible.
However, it was realized that there were error conditions that resulted in a `NativeMethodException` when in fact the underlying error was not due to a native method, and was not unique to virtual threads. The appropriate exception in this case would be an `OpaqueFrameException `instead of a `NativeMethodException.`
Both these APIs have now been updated to be consistent with when these two exceptions are thrown for both virtual threads and platform threads. This means you may now see these two APIs throw `OpaqueFrameException` for a platform thread when previously this was not possible.