mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:43:25 +00:00
Some error reporting on divelogs.de export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8c706357f4
commit
1d10a56bdf
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue