mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +02:00
Add better error logging in Octree::writeToJSONFile
This commit is contained in:
parent
c2f08dfdba
commit
2b49d84a22
1 changed files with 6 additions and 1 deletions
|
@ -978,9 +978,14 @@ bool Octree::writeToJSONFile(const char* fileName, const OctreeElementPointer& e
|
||||||
if (persistFile.open(QIODevice::WriteOnly)) {
|
if (persistFile.open(QIODevice::WriteOnly)) {
|
||||||
if (persistFile.write(jsonDataForFile) != -1) {
|
if (persistFile.write(jsonDataForFile) != -1) {
|
||||||
success = persistFile.commit();
|
success = persistFile.commit();
|
||||||
|
if (!success) {
|
||||||
|
qCritical() << "Failed to commit to JSON save file:" << persistFile.errorString();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qCritical("Failed to write to JSON file.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCritical("Could not write to JSON description of entities.");
|
qCritical("Failed to open JSON file for writing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Reference in a new issue