Browse files

Better error handling in Fix Elevation

A common error ("Gateway Timeout") is explicitly reported
On error the LUW is terminated to allow the user to undo partial changes.
  • Loading branch information...
amtriathlon committed Nov 6, 2018
1 parent a854b9d commit 44ea4d4dc3a021810115a8985bafc9b10afb6f71
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/FileIO/FixElevation.cpp
@@ -165,6 +165,8 @@ FixElevation::postProcess(RideFile *ride, DataProcessorConfig *config=0, QString
QMessageBox oops(QMessageBox::Critical, tr("Fix Elevation Data not possible"),
tr("The following problem occured: %1").arg(err));
// close LUW
return false;
@@ -286,6 +288,8 @@ FetchElevationDataFromMapQuest(QString latLngCollection)
throw QString(QObject::tr("Monthly free plan limit exceeded"));
if (elevationJSON.contains("Bad Request"))
throw QString(QObject::tr("Bad request"));
if (elevationJSON.contains("Gateway Timeout"))
throw QString(QObject::tr("Gateway Timeout"));
if (error != QNetworkReply::NoError)
throw QString(QObject::tr("Networkerror: %1")).arg(error);

0 comments on commit 44ea4d4

Please sign in to comment.