From 1d10a56bdf6823e8935729aef60b659dea550a6a Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 25 Oct 2015 17:10:53 +0200 Subject: Some error reporting on divelogs.de export Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui') 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); -- cgit v1.2.3-70-g09d2