[gdal-dev] RFC 37: User context data in CPLErrorHandler callbacks

Daniel Morissette dmorissette at mapgears.com
Tue Oct 25 20:50:48 EDT 2011


On 11-10-25 11:20 AM, Howard Butler wrote:
> All,
>
> I have prepared an RFC to support the implementation of providing user context data in CPLErrorHandling scenarios. I suspect this is a non-controversial proposal with limited applicability and impact for most folks, and I hope to pass the RFC and implement the proposed code in trunk in a week or so.
>
> http://trac.osgeo.org/gdal/wiki/rfc37_cplerror_userdata
>

Please forgive the naive question, but to make things really simple from 
the API standpoint, instead of accessing the pUserData via 
CPLGetErrorHandlerUserData(), could we not instead define a new type of 
error handler that receives the user data as argument?

typedef void (CPL_STDCALL *CPLErrorHandlerEx)(CPLErr, int, const char*, 
void *);

I guess that would imply changing the CPLErrorHandlerNode to support two 
types of handlers. Maybe that's why you didn't choose to take that approach?

Okay, I guess I answered my own question... if yes then sorry for the 
noise...

-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000



More information about the gdal-dev mailing list