Permalink
Browse files

Restore error reporting for invalid attribute filters (#5427)

  • Loading branch information...
szekerest committed May 10, 2017
1 parent 208bb3a commit c5497982fd97cf2eba84eb5af11f19c1cf3cad7f
Showing with 5 additions and 0 deletions.
  1. +5 −0 mapogr.cpp
View
@@ -2585,7 +2585,12 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
CPLErrorReset();
if( OGR_L_SetAttributeFilter( psInfo->hLayer, pszOGRFilter ) != OGRERR_NONE ) {
msSetError(MS_OGRERR, "SetAttributeFilter() failed on layer %s. Check logs.", "msOGRFileWhichShapes()", layer->name?layer->name:"(null)");
msDebug("SetAttributeFilter(%s) failed on layer %s.\n%s\n", pszOGRFilter, layer->name?layer->name:"(null)", CPLGetLastErrorMsg() );
RELEASE_OGR_LOCK;
msFree(pszOGRFilter);
msFree(select);
return MS_FAILURE;
}
msFree(pszOGRFilter);
} else

0 comments on commit c549798

Please sign in to comment.