[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Make error handling of public API consistent

From: Egeyar Bagcioglu
Subject: Re: [PATCH v2] Make error handling of public API consistent
Date: Wed, 11 Nov 2020 21:56:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

Hi Mohammad,

All `ios_cur`, `ios_search` and `ios_search_by_id` functions will return `NULL`
when the entry does not exist.
I don't think that's a failure or error. Everything in the library worked
as expected and not found the requested item.
Oh, of course.
We have to return PK_IOS_INVALID in that case, and set status to PK_OK.

Do you mean we have to return `NULL`?
Or ...
Hm yes,  return NULL and set pk_errno to PK_OK.
Your code was right, sorry for the noise :)

I see that you found a common agreement. I agree that these functions cannot trigger an error. Non-existence of an IOS is a perfectly normal behaviour.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]