Skip to content

Commit

Permalink
If a network request error occurs while reading the streamed GML, the…
Browse files Browse the repository at this point in the history
…n return a failure status from the getFeatures method
  • Loading branch information
palmerj committed Jul 14, 2013
1 parent 738b7e3 commit 2db4f35
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/qgsgml.cpp
Expand Up @@ -128,9 +128,22 @@ int QgsGml::getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangl
QCoreApplication::processEvents();
}

QNetworkReply::NetworkError replyError = reply->error();
QString replyErrorString = reply->errorString();

delete reply;
delete progressDialog;

if ( replyError )
{
QgsMessageLog::logMessage(
tr( "GML Getfeature network request failed with error: %1" ).arg( replyErrorString ),
tr( "Network" ),
QgsMessageLog::CRITICAL
);
return 1;
}

if ( *mWkbType != QGis::WKBNoGeometry )
{
if ( mExtent.isEmpty() )
Expand Down

0 comments on commit 2db4f35

Please sign in to comment.