Skip to content

Commit

Permalink
log message for no match wms/wmst service exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed May 11, 2020
1 parent 27f345f commit 1377805
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -1674,7 +1674,8 @@ bool QgsWmsProvider::parseServiceExceptionReportDom( QByteArray const &xml, QStr
QgsDebugMsg( e.tagName() ); // the node really is an element.

QString tagName = e.tagName();
if ( tagName.startsWith( QLatin1String( "wms:" ) ) )
if ( tagName.startsWith( QLatin1String( "wms:" ) ) ||
tagName.startsWith( QLatin1String( "ogc:" ) ) )
tagName = tagName.mid( 4 );

if ( tagName == QLatin1String( "ServiceException" ) )
Expand Down Expand Up @@ -1754,6 +1755,14 @@ void QgsWmsProvider::parseServiceException( QDomElement const &e, QString &error
{
errorText = tr( "Request is for an optional operation that is not supported by the server." );
}
else if ( seCode == QLatin1String( "NoMatch" ) )
{
QString locator = e.attribute( QStringLiteral( "locator" ) );
if ( locator == QLatin1String( "time" ) )
errorText = tr( "Request contains a time value that does not match any available layer in the server." );
else
errorText = tr( "Request contains some parameter value that does not match any available layer in the server" );
}
else if ( seCode.isEmpty() )
{
errorText = tr( "(No error code was reported)" );
Expand Down

0 comments on commit 1377805

Please sign in to comment.