mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-10 08:12:08 +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.write(jsonDataForFile) != -1) {
|
||||
success = persistFile.commit();
|
||||
if (!success) {
|
||||
qCritical() << "Failed to commit to JSON save file:" << persistFile.errorString();
|
||||
}
|
||||
} else {
|
||||
qCritical("Failed to write to JSON file.");
|
||||
}
|
||||
} else {
|
||||
qCritical("Could not write to JSON description of entities.");
|
||||
qCritical("Failed to open JSON file for writing.");
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
Loading…
Reference in a new issue