Hi, On 16 August 2016 at 00:29, Felipe Magno de Almeida < felipe.m.alme...@gmail.com> wrote:
> On Mon, Aug 15, 2016 at 12:19 PM, Gustavo Sverzut Barbieri > <barbi...@gmail.com> wrote: > > On Mon, Aug 15, 2016 at 11:27 AM, Felipe Magno de Almeida > > <felipe.m.alme...@gmail.com> wrote: > >> On Aug 15, 2016 2:42 AM, "Gustavo Sverzut Barbieri" <barbi...@gmail.com > > > > [snip] > > >> However, is there a limit to errno values defined in > >> posix or we would be just guessing? > > > > I did not find any "_LAST" or "_COUNT" looking into > > /usr/include/*errno.h. Another solution is to use a bit that we set on > > ours (since Eina_Error is int, not unsigned, we could use the 31th bit > > for that). > > It seems good enough for me. You have my support, and this doesn't > break API or ABI, since values are registered anyway. And we > desperately need a convention for error-handling. > > >> Also, make zero a non error too. > > > > sure, errno uses 0 = success (no error) :-) > Yes, 0 should mean success. And no problem with mapping errno. But I'm not 100% sure about the usage of Eina_Error as a return value. When we return a value, do we also call eina_error_set()? In any case, Eina_Error at the moment can be used for exceptional cases and APIs that don't or can't return precise error information (eg. return NULL... but what failed?). Eg. a new patch I just pushed (set error to timeout in timedwait). -- Jean-Philippe André ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel