1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Improved error handling

This commit is contained in:
Martin Tůma 2018-10-26 18:47:34 +02:00
parent 9f3129f899
commit f6b1344ee2

View File

@ -249,8 +249,6 @@ bool WMTS::parseCapabilities(const QString &path, CTX &ctx)
return false;
}
createZooms(ctx);
if (!ctx.hasLayer) {
_errorString = ctx.setup.layer() + ": layer not provided";
return false;
@ -280,7 +278,8 @@ bool WMTS::parseCapabilities(const QString &path, CTX &ctx)
_errorString = ctx.crs + ": unknown CRS";
return false;
}
if (ctx.matrixes.isEmpty()) {
createZooms(ctx);
if (_zooms.isEmpty()) {
_errorString = "No usable tile matrix found";
return false;
}