Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ mono_monitor_wait (MonoObjectHandle obj_handle, guint32 ms, MonoBoolean allow_in

#ifdef DISABLE_THREADS
if (ms == MONO_INFINITE_WAIT) {
mono_error_set_synchronization_lock (error, "Cannot wait on monitors on this runtime.");
mono_error_set_platform_not_supported (error, "Cannot wait on monitors on this runtime.");
return FALSE;
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/metadata/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ ves_icall_System_Threading_Thread_Thread_internal (MonoThreadObjectHandle thread
MonoObject *start = MONO_HANDLE_RAW (start_handle);

#ifdef DISABLE_THREADS
mono_error_set_not_supported (error, "Cannot start threads on this runtime.");
mono_error_set_platform_not_supported (error, "Cannot start threads on this runtime.");
return FALSE;
#endif

Expand Down Expand Up @@ -6744,7 +6744,7 @@ ves_icall_System_Threading_Thread_StartInternal (MonoThreadObjectHandle thread_h
gboolean res;

#ifdef DISABLE_THREADS
mono_error_set_not_supported (error, "Cannot start threads on this runtime.");
mono_error_set_platform_not_supported (error, "Cannot start threads on this runtime.");
return;
#endif

Expand Down
5 changes: 5 additions & 0 deletions src/mono/mono/utils/mono-error-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ mono_error_set_cannot_unload_appdomain (MonoError *error, const char *message)
mono_error_set_generic_error (error, "System", "CannotUnloadAppDomainException", "%s", message);
}

static inline void
mono_error_set_platform_not_supported (MonoError *error, const char *message)
{
mono_error_set_generic_error (error, "System", "PlatformNotSupportedException", "%s", message);
}

MonoException*
mono_error_prepare_exception (MonoError *error, MonoError *error_out);
Expand Down