WMS server: throw LayerNotDefined exception when undefined layer is requested

This is according to WMS 1.1.0 / 1.1.1 / 1.3.0 specs
This commit is contained in:
Martin Dobias 2015-01-12 17:54:38 +07:00
parent 6e4c5078f5
commit 03edac976a

View File

@ -199,6 +199,9 @@ QList<QgsMapLayer*> QgsWMSProjectParser::mapLayerFromStyle( const QString& lName
}
}
if ( layers.count() == 0 )
throw QgsMapServiceException( "LayerNotDefined", QString( "Layer \"%1\" does not exist" ).arg( lName ) );
return layers.values();
}