[gdal-dev] NULL-returning functions and CPLGetLastErrorMsg
Laurențiu Nicola
lnicola at dend.ro
Wed Nov 27 07:37:15 PST 2024
Hello,
Many GDAL functions can return nullptr (e.g. OSRGetName, OSRGetAuthorityCode etc.), but it's not clear if they set an error message that can be retrieved using CPLGetLastErrorMsg. I tried to check the code, but CPLErrorSetState isn't called from many places, so I'm probably missing something like a PROJ/GEOS error handler that sets it.
Is there any rule-of-thumb for figuring out when CPLGetLastErrorMsg should be used?
Thanks,
Laurentiu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241127/8befcc9b/attachment.htm>
More information about the gdal-dev
mailing list