When I run a batch script using a GDAL/OGR program, I can detect if an error occured by checking
ERRORLEVELfor the value 1.When using GDAL/OGR in python or .NET, I get an exception when an error occurs.
Question:
How do I detect if a Warning was issued during the execution?
Why?
Even though a process can execute to the end despite of warnings, the output might be corrupt with respect to the data I expect. You could argue that I ought to check for these corruptions, but since I have control of the entire process, I would like to be able to stop when a warning is issued.