Skip to content
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