I have this incorrect code:
try
        {
        myDataset = (GDALDataset *) GDALOpen( "myimg", GA_ReadOnly );
        }
        catch(int n)
        {
                cout << "File not existent!" << endl;
                return 14;
        }


I would like to catch the exception thrown by GDALOpen if the file is not
existent and manage it in a way to return an integer that I want and not the
default 134.

How can I achieve this?

Thanks in advance!

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Catch-a-GDALOpen-exception-tp6246599p6246599.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to