aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-10-25 17:10:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-26 01:19:40 +0900
commit1d10a56bdf6823e8935729aef60b659dea550a6a (patch)
treef547f1ff312bd1e8052c8c91a283b69de5706259 /qt-ui/subsurfacewebservices.cpp
parent8c706357f477917959fe2d1912909db6675d3e49 (diff)
downloadsubsurface-1d10a56bdf6823e8935729aef60b659dea550a6a.tar.gz
Some error reporting on divelogs.de export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 7c67ecc67..18f42819e 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -170,6 +170,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
xslt = get_stylesheet("divelogs-export.xslt");
if (!xslt) {
qDebug() << errPrefix << "missing stylesheet";
+ report_error(tr("stylesheet to export to divelogs.de is not found").toUtf8());
return false;
}
@@ -238,6 +239,11 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
free((void *)membuf);
transformed = xsltApplyStylesheet(xslt, doc, NULL);
+ if (!transformed) {
+ qWarning() << errPrefix << "XSLT transform failed for dive: " << i;
+ report_error(tr("Conversion of dive %1 to divelogs.de format failed").arg(i).toUtf8());
+ continue;
+ }
xmlDocDumpMemory(transformed, (xmlChar **)&membuf, &streamsize);
xmlFreeDoc(doc);
xmlFreeDoc(transformed);