normalize errors #9

Open
dvv opened this Issue Oct 9, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

dvv commented Oct 9, 2012

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

Owner

richardhundt commented Oct 9, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment