[gdal-dev] Re: Catch a GDALOpen exception

2011-04-07 Thread canduc17
Very interesting... I'm not a C++ expert, but I'm always curious to learn possibilities like this, thank you! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Catch-a-GDALOpen-exception-tp6246599p6251016.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___

Re: [gdal-dev] Re: Catch a GDALOpen exception

2011-04-07 Thread Mateusz Loskot
On 07/04/11 08:04, canduc17 wrote: Ok. So if I have well understood the most safe thing to do is the following: myDataset = (GDALDataset *) GDALOpen( "myFile.tif", GA_ReadOnly ); if(myDataset == NULL ) { return 14; } Depends on what you consider as "most

[gdal-dev] Re: Catch a GDALOpen exception

2011-04-07 Thread canduc17
Ok. So if I have well understood the most safe thing to do is the following: myDataset = (GDALDataset *) GDALOpen( "myFile.tif", GA_ReadOnly ); if(myDataset == NULL ) { return 14; } Indeed it works and I obtain 14 as returning value of my program... -- View