luv
luv copied to clipboard
normalize errors
Hi!
Please, consider normalizing returned errors. Examples of inconsistency:
https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L62 https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L114 https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L132
etc.
IMHO it's the best to return stringified error code ("ENOMEM", "EEXIST"
etc). The rationale is: to not introduce incompatibility between platforms (as E*
integers may vary); to not introduce errors enumerations; to not decide for user on error format.
TIA, --Vladimir
Yeah, needs doing. Stringified error codes is a good idea. I'll give it a shot.
On Oct 9, 2012, at 2:42 PM, Vladimir Dronnikov wrote:
Hi!
Please, consider normalizing returned errors. Examples of inconsistency:
https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L62 https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L114 https://github.com/richardhundt/luv/blob/master/src/luv_stream.c#L132
etc.
IMHO it's the best to return stringified error code ("ENOMEM", "EEXIST" etc). The rationale is: to not introduce incompatibility between platforms (as E* integers may vary); to not introduce errors enumerations; to not decide for user on error format.
TIA, --Vladimir
— Reply to this email directly or view it on GitHub.