mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
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:
parent
6e4c5078f5
commit
03edac976a
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user