[Gdal-dev] GDAL CPLError and C++ Exceptions
mhanson at photon.com
Mon Nov 27 17:24:36 EST 2006
Hi, I recently got hung up on tracking down an GDAL error because I'm not handling errors from CPLError. I'd like to be able to handle those errors and create C++ Exceptions but I'm not clear on how to do so. Anyone have any code examples for how I might turn CPLErrors into Exceptions? It looks like I should probably set the error handler, but what should that function look like? Would it simply examine the contents of the GDAL Error number and message and decide to throw or not throw an exception? (which would then be presumably caught in a user's application).
More information about the Gdal-dev