AllenDang / w32

A wrapper of windows apis for the Go Programming Language.
Other
766 stars 246 forks source link

Does this package need panic when error is return or just return the error? #74

Open bronze1man opened 7 years ago

bronze1man commented 7 years ago

GetClientRect panic when error is return. ReleaseDC return false when error is return. CreateWindowEx return null and ignore the real error message. (I have verified the GetLastError api will not return error when this api fail.)

Here is my suggest:

gonutz commented 4 years ago

I have an actively maintained fork which I use to create both 32 and 64 bit applications, both for work and for private projects. I have been wanting to remove those panics for a long time and now finally I have, replacing it with simply doing nothing where they did not make sense in the first place or returning an error additionally from functions:

https://github.com/gonutz/w32