-
Notifications
You must be signed in to change notification settings - Fork 564
Open
Labels
Area: CoreCLRIssues that only occur when using CoreCLR.Issues that only occur when using CoreCLR.
Milestone
Description
Android framework version
net10.0-android (Preview)
Affected platform version
.NET 10
Description
The JNIEnv.PropagateUncaughtException implementation for CoreCLR is missing:
android/src/Mono.Android/Android.Runtime/JNIEnv.cs
Lines 86 to 114 in bb5968d
| internal static void PropagateUncaughtException (IntPtr env, IntPtr javaThreadPtr, IntPtr javaExceptionPtr) | |
| { | |
| if (!JNIEnvInit.PropagateExceptions) | |
| return; | |
| var javaException = JavaObject.GetObject<Java.Lang.Throwable> (env, javaExceptionPtr, JniHandleOwnership.DoNotTransfer)!; | |
| if (Debugger.IsAttached) { | |
| AndroidRuntimeInternal.mono_unhandled_exception?.Invoke (javaException); | |
| } | |
| try { | |
| var jltp = javaException as JavaProxyThrowable; | |
| Exception? innerException = jltp?.InnerException; | |
| Logger.Log (LogLevel.Info, "MonoDroid", "UNHANDLED EXCEPTION:"); | |
| Logger.Log (LogLevel.Info, "MonoDroid", javaException.ToString ()); | |
| if (RuntimeFeature.IsMonoRuntime) { | |
| MonoDroidUnhandledException (innerException ?? javaException); | |
| } else if (RuntimeFeature.IsCoreClrRuntime) { | |
| // TODO: what to do here? | |
| } else { | |
| throw new NotSupportedException ("Internal error: unknown runtime not supported"); | |
| } | |
| } catch (Exception e) { | |
| Logger.Log (LogLevel.Error, "monodroid", "Exception thrown while raising AppDomain.UnhandledException event: " + e.ToString ()); | |
| } | |
| } |
Steps to Reproduce
Did you find any workaround?
No response
Relevant log output
Metadata
Metadata
Assignees
Labels
Area: CoreCLRIssues that only occur when using CoreCLR.Issues that only occur when using CoreCLR.