private static Exception GetLastError() { IntPtr pointer = NativeUnixMehods.dlerror(); return(pointer != IntPtr.Zero ? new InvalidOperationException(Marshal.PtrToStringAnsi(pointer)) : null); }
private static Exception GetLastErrorUnix() { string message = NativeUnixMehods.dlerror(); return(message != null ? new InvalidOperationException(message) : null); }