mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Improved error reporting
This commit is contained in:
parent
02e724fefb
commit
fda33cc95b
@ -161,6 +161,20 @@ void PCS::loadList(const QString &path)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (LinearUnits(units).isNull()) {
|
||||||
|
qWarning("%s: %d: Unknown linear units code", qPrintable(path), ln);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Projection::Method(transform).isNull()) {
|
||||||
|
qWarning("%s: %d: Unknown coordinate transformation code",
|
||||||
|
qPrintable(path), ln);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!(gcs = GCS::gcs(gcsid))) {
|
||||||
|
qWarning("%s: %d: Unknown GCS code", qPrintable(path), ln);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Projection::Setup setup;
|
Projection::Setup setup;
|
||||||
if ((pn = projectionSetup(list, setup))) {
|
if ((pn = projectionSetup(list, setup))) {
|
||||||
qWarning("%s: %d: Invalid projection parameter #%d",
|
qWarning("%s: %d: Invalid projection parameter #%d",
|
||||||
@ -168,16 +182,7 @@ void PCS::loadList(const QString &path)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gcs = GCS::gcs(gcsid))) {
|
|
||||||
qWarning("%s: %d: Unknown GCS code", qPrintable(path), ln);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
PCS pcs(gcs, transform, setup, units);
|
PCS pcs(gcs, transform, setup, units);
|
||||||
if (!pcs.isValid())
|
|
||||||
qWarning("%s: %d: Unknown coordinate transformation/linear units code",
|
|
||||||
qPrintable(path), ln);
|
|
||||||
else
|
|
||||||
_pcss.append(Entry(id, proj, pcs));
|
_pcss.append(Entry(id, proj, pcs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,5 +191,5 @@ QDebug operator<<(QDebug dbg, const PCS &pcs)
|
|||||||
{
|
{
|
||||||
dbg.nospace() << "PCS(" << *pcs.gcs() << ", " << pcs.method() << ", "
|
dbg.nospace() << "PCS(" << *pcs.gcs() << ", " << pcs.method() << ", "
|
||||||
<< pcs.units() << ", " << pcs.setup() << ")";
|
<< pcs.units() << ", " << pcs.setup() << ")";
|
||||||
return dbg.maybeSpace();
|
return dbg.space();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user