[sane-devel] SANE V2

Dave Close dave+sane@compata.com
Fri, 06 Dec 2002 21:46:13 -0800

"Matthew Duggan" wrote:
>> SANE_String_Const sane_verbose_error(Sane_Handle h)
>I like this, and it's pretty much what I was looking for.  I only have
>one criticism from a backend writing point of view: What happens if the
>only return has been SANE_STATUS_GOOD?  Maybe just:
>This function returns a verbose description of the latest error, or an
>empty string if no error has occured.

How do you all propose to handle multiple calls to sane_verbose_error()
without any other intervening SANE function call? Does calling this
function "reset" in some sense the understanding of what was the latest
error, or does it return the same result repeatedly - or should the
standard specify?

This thought occurs because I understand the proposal to mean than any
function which returns some SANE_STATUS_* resets the "latest" error
state. How about SANE functions which don't return a SANE_STATUS_*,
like sane_verbose_error()? In some sense, they do return a status, even
if only by returning a null string.
       Dave Close, Compata, Costa Mesa CA       +1 714 434 7359   
       dave@compata.com              dhclose@alumni.caltech.edu         
         "Everything that can be invented has been invented."
       -- Charles H. Duell, Commissioner, US Patent Office, 1899