Skip to content

Commit

Permalink
SetLastError slightly later, in case last error not preserved, and it…
Browse files Browse the repository at this point in the history
… is just as good. (mono/mono#17483)

SetLastError slightly later, in case last error not preserved, and it is just as good.




Commit migrated from mono/mono@92c08fa
  • Loading branch information
jaykrell authored and monojenkins committed Oct 23, 2019
1 parent e0663e3 commit bdd5952
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mono/mono/metadata/w32process-win32-uwp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ MonoArrayHandle
ves_icall_System_Diagnostics_Process_GetProcesses_internal (MonoError *error)
{
g_unsupported_api ("EnumProcesses");
SetLastError (ERROR_NOT_SUPPORTED);
mono_error_set_not_supported (error, "This system does not support EnumProcesses");
SetLastError (ERROR_NOT_SUPPORTED);
return NULL_HANDLE_ARRAY;
}

Expand Down Expand Up @@ -101,8 +101,8 @@ ves_icall_Microsoft_Win32_NativeMethods_GetProcessWorkingSetSize (gpointer handl
ERROR_DECL (error);
g_unsupported_api ("GetProcessWorkingSetSize");
mono_error_set_not_supported(error, G_UNSUPPORTED_API, "GetProcessWorkingSetSize");
SetLastError (ERROR_NOT_SUPPORTED);
mono_error_set_pending_exception (error);
SetLastError (ERROR_NOT_SUPPORTED);
return FALSE;
}

Expand All @@ -112,8 +112,8 @@ ves_icall_Microsoft_Win32_NativeMethods_SetProcessWorkingSetSize (gpointer handl
ERROR_DECL (error);
g_unsupported_api ("SetProcessWorkingSetSize");
mono_error_set_not_supported (error, G_UNSUPPORTED_API, "SetProcessWorkingSetSize");
SetLastError (ERROR_NOT_SUPPORTED);
mono_error_set_pending_exception (error);
SetLastError (ERROR_NOT_SUPPORTED);
return FALSE;
}

Expand All @@ -125,8 +125,8 @@ ves_icall_Microsoft_Win32_NativeMethods_GetPriorityClass (gpointer handle)
ERROR_DECL (error);
g_unsupported_api ("GetPriorityClass");
mono_error_set_not_supported (error, G_UNSUPPORTED_API, "GetPriorityClass");
SetLastError (ERROR_NOT_SUPPORTED);
mono_error_set_pending_exception (error);
SetLastError (ERROR_NOT_SUPPORTED);
return FALSE;
}

Expand All @@ -138,8 +138,8 @@ ves_icall_Microsoft_Win32_NativeMethods_SetPriorityClass (gpointer handle, gint3
ERROR_DECL (error);
g_unsupported_api ("SetPriorityClass");
mono_error_set_not_supported(error, G_UNSUPPORTED_API, "SetPriorityClass");
SetLastError (ERROR_NOT_SUPPORTED);
mono_error_set_pending_exception (error);
SetLastError (ERROR_NOT_SUPPORTED);
return FALSE;
}

Expand Down

0 comments on commit bdd5952

Please sign in to comment.