add ogr plugin error handling to master/3.x
Merge pull request #2354 from kernelsanders/master

add ogr plugin error handling to master/3.x