Skip to content
Permalink
Browse files

log message for no match wms/wmst service exceptions

  • Loading branch information
Samweli authored and nyalldawson committed May 10, 2020
1 parent 27f345f commit 1377805637852a015ab9c9599969251ddd8f42a9
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/providers/wms/qgswmsprovider.cpp
@@ -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" ) )
@@ -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)" );

0 comments on commit 1377805

Please sign in to comment.
You can’t perform that action at this time.