Skip to main content

error_message

Function error_message 

Source
pub fn error_message(error: i32) -> GString
Expand description

Translate a Win32 error code into a human readable message.

The error code could be as returned by GetLastError() or WSAGetLastError().

The message is either language neutral, or in the thread’s language, or the user’s language, the system’s language, or US English (see documentation for FormatMessage()). The returned string is in UTF-8.

If a human readable message cannot be found for the given @error, an empty string is returned.

§error

Win32 error code

§Returns

newly-allocated error message