wRTOSException.GetCustomErrorMessage Method

wRTOS real-time APIs can fail with GetLastError returning a custom Win32 error code. Custom error codes have bit 29 set to mark them as application-specific error codes (per Microsoft standards). This method maps a custom Win32 error code to a human-readable message describing the error. When the wRTOS Managed library throws an exception of type Win32Exception (or when another type of exception has a Win32Exception object as the InnerException), you can obtain the underlying Win32 error code from property NativeErrorCode on the Win32Exception object.

Namespace:  IntervalZero.MaxRT.wRTOS
Assembly:  IntervalZero.MaxRT.wRTOS (in IntervalZero.MaxRT.wRTOS .dll) Version: 1.0.0.0 (File version: 1.0.0)

Syntax

Copy
public static string GetCustomErrorMessage(
    int customErrorCode
)

Parameters

customErrorCode

Type: System.Int32

Return Value

Type: String

See Also: