Navigation Menu

Skip to content

Commit

Permalink
WMS server: throw LayerNotDefined exception when undefined layer is r…
Browse files Browse the repository at this point in the history
…equested

This is according to WMS 1.1.0 / 1.1.1 / 1.3.0 specs
  • Loading branch information
wonder-sk committed Jan 12, 2015
1 parent 6e4c507 commit 03edac9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/qgswmsprojectparser.cpp
Expand Up @@ -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();
}

Expand Down

0 comments on commit 03edac9

Please sign in to comment.