Use of 'errno' in example

Aleksey naumov at a...
Fri Dec 14 12:44:39 EST 2001


Frank,

I have a small question on the use of 'errno' variable in the documentation 
for the CPLSetErrorHandler() -- it isn't the 'errno' defined in errno.h, is 
it? 
If it isn't, maybe change the name in documentation? It's a small 
inconsistency but would prevent a compiler error as a result of copy & paste 
from there (that's what I did for my error handling function)? Maybe change 
to 'err_no' as in CPLError in cpl_error.h?

Thanks,

Aleksey

>From cpl_error.cpp:

/**********************************************************************
* CPLSetErrorHandler()
**********************************************************************/

/**
* Install custom error handler.
*
* Allow the library's user to specify his own error handler function.
* A valid error handler is a C function with the following prototype:
*
* <pre>
* void MyErrorHandler(CPLErr eErrClass, int errno, const char *msg)
* </pre>




More information about the Gdal-dev mailing list