Fixed #24014 -- Unified OGRException and GDALException