Skip to content

Interop.Errors.cs #40319

Answered by danmoseley
olapchuk asked this question in General
Aug 4, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Win32Exception() works on Unix (it's a terrible name - historical) and you can either pass the errno or it will get it itself with Marshal.GetLastWin32Error() (again, historical name) and then it will use the code to get a message using strerror on Unix.

public Win32Exception(int error) : this(error, GetErrorMessage(error))

return Interop.Sys.StrError(RawErrno);

Does that help?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@olapchuk
Comment options

@danmoseley
Comment options

Answer selected by olapchuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants