diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c index 1f9fe652978c..b514e7ac3102 100644 --- a/mono/metadata/exception.c +++ b/mono/metadata/exception.c @@ -1537,6 +1537,6 @@ mono_error_convert_to_exception_handle (MonoError *error) void ves_icall_System_Exception_ReportUnhandledException(MonoObject *exc) { - mono_unhandled_exception (exc); + mono_unhandled_exception_internal (exc); mono_invoke_unhandled_exception_hook (exc); } \ No newline at end of file diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h index 4268026eb1cb..db60b2e16274 100644 --- a/mono/metadata/icall-def.h +++ b/mono/metadata/icall-def.h @@ -343,6 +343,10 @@ HANDLES(ENV_17, "internalGetEnvironmentVariable_native", ves_icall_System_Enviro HANDLES(ENV_18, "internalGetGacPath", ves_icall_System_Environment_GetGacPath, MonoString, 0, ()) HANDLES(ENV_19, "internalGetHome", ves_icall_System_Environment_InternalGetHome, MonoString, 0, ()) NOHANDLES(ICALL(ENV_20, "set_ExitCode", mono_environment_exitcode_set)) + +ICALL_TYPE(EXCEPTION, "System.Exception", EXCEPTION_1) +NOHANDLES(ICALL(EXCEPTION_1, "ReportUnhandledException", ves_icall_System_Exception_ReportUnhandledException)) + ICALL_TYPE(GC, "System.GC", GC_10) NOHANDLES(ICALL(GC_10, "GetAllocatedBytesForCurrentThread", ves_icall_System_GC_GetAllocatedBytesForCurrentThread)) NOHANDLES(ICALL(GC_0, "GetCollectionCount", ves_icall_System_GC_GetCollectionCount)) @@ -357,9 +361,6 @@ HANDLES(GC_7, "_SuppressFinalize", ves_icall_System_GC_SuppressFinalize, void, 1 HANDLES(GC_9, "get_ephemeron_tombstone", ves_icall_System_GC_get_ephemeron_tombstone, MonoObject, 0, ()) HANDLES(GC_8, "register_ephemeron_array", ves_icall_System_GC_register_ephemeron_array, void, 1, (MonoObject)) -ICALL_TYPE(EXCEPTION, "System.Exception", EXCEPTION_1) -HANDLES(ICALL(EXCEPTION_1, "ReportUnhandledException", ves_icall_System_Exception_ReportUnhandledException)) - ICALL_TYPE(CALDATA, "System.Globalization.CalendarData", CALDATA_1) HANDLES(CALDATA_1, "fill_calendar_data", ves_icall_System_Globalization_CalendarData_fill_calendar_data, MonoBoolean, 3, (MonoCalendarData, MonoString, gint32)) @@ -1035,8 +1036,8 @@ NOHANDLES(ICALL(NATIVEC_4, "ResetEvent_internal", ves_icall_System_Threading_Ev NOHANDLES(ICALL(NATIVEC_5, "SetEvent_internal", ves_icall_System_Threading_Events_SetEvent_internal)) ICALL_TYPE(OSSYNCCONTEXT, "System.Threading.OSSpecificSynchronizationContext", OSSYNCCONTEXT_1) -HANDLES(ICALL(OSSYNCCONTEXT_1, "GetOSContext", ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext)) -ICALL(OSSYNCCONTEXT_2, "PostInternal", ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal) +NOHANDLES(ICALL(OSSYNCCONTEXT_1, "GetOSContext", ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext)) +NOHANDLES(ICALL(OSSYNCCONTEXT_2, "PostInternal", ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal)) ICALL_TYPE(SEMA, "System.Threading.Semaphore", SEMA_1) NOHANDLES(ICALL(SEMA_1, "CreateSemaphore_icall", ves_icall_System_Threading_Semaphore_CreateSemaphore_icall)) diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index 03d935417ac2..1a647c9520db 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -9861,5 +9861,5 @@ void ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal (gpointer callback, gpointer arg) { /* This isn't actually reachable since ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext always returns NULL */ - mono_set_pending_exception (mono_get_exception_not_implemented ("System.Threading.InteropServices.OSSpecificSynchronizationContext.PostInternal internal call is not implemented.")); + mono_set_pending_exception (mono_exception_from_name_msg (mono_get_corlib (), "System", "NotImplementedException", "System.Threading.InteropServices.OSSpecificSynchronizationContext.PostInternal internal call is not implemented.")); }