Hello Mark,
according my last tests, setting error_print and error_level will not change
the errno return behavior. It will create (much) more output, readable by a
human from console or syslog. 
But I'm searching for a error handling within my application and do some
things based on different error types. So it looks like there are a lot of
different errors bundled in the errno=2

Is there somewhere a documentation, maybe in the sources, what the meaning
is of the different errno?

Thanks
  Achim


Mark Richards-3 wrote:
> 
> On 8/16/2011 19:17, ekgnkb3d wrote:
>> Hi all,
>> after some tests with the owcapi I found out, that for example the
>> OW_get()
>> returns -1 with an errno of "2" in the following cases:
>> - invalid directory path, like "uncaxxched/"
>> - wrong CRC in unique-id of the device
>> - device is not reachable
>>
>> did I made something wrong, or is there another method of determining a
>> reason for an error?
>>
>> Thanks
>>    Achim
>>
> use these before calling ow_init, then you will see the errors.
> 
>      OW_set_error_print("0");
>      OW_set_error_level("6");
> //OW_set_error_level=(0=default, 1=err_connect, 2=err_call, 3=err_data, 
> 4=err_detail, 5=err_debug, 6=err_beyond)
> //OW_set_error_print sets where the debug output should be directed. 
> 0=mixed output, 1=syslog, 2=console.
> 
> It would be nice if the API had an error callback.
> 
> /m
> 
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
> user administration capabilities and model configuration. Take 
> the hassle out of deploying and managing Subversion and the 
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> 

-- 
View this message in context: 
http://old.nabble.com/errno-in-owcapi-tp32275960p32279704.html
Sent from the OWFS - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to