1

I have an operation:

var warpTif = Gdal.wrapper_GDALWarpDestName(ecwTif, 1, dss, warpOptions,
                    new Gdal.GDALProgressFuncDelegate(GdalProgressFunc), $"Warping {vrtName}:");

that uses the warp option -wm 6000 that I'm expecting to throw an integer overflow error and stop execution as it would via command line utility. However, the operation continues with warptif being null therefore throwing null reference exceptions later down the line. How does one properly handle gdal errors in C#? I have tried this but nothing happens...

PS - Obviously -wm 6000 is wrong and should be something more appropriate but I would still like to know how to capture this error and log it's message.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.