GH-1268 ... and catch the inevitable errors
This commit is contained in:
parent
439c6b43a3
commit
4fbcb3efb9
@ -177,8 +177,15 @@ void InstanceList::saveGroupList()
|
|||||||
}
|
}
|
||||||
toplevel.insert("groups", groupsArr);
|
toplevel.insert("groups", groupsArr);
|
||||||
QJsonDocument doc(toplevel);
|
QJsonDocument doc(toplevel);
|
||||||
|
try
|
||||||
|
{
|
||||||
FS::write(groupFileName, doc.toJson());
|
FS::write(groupFileName, doc.toJson());
|
||||||
}
|
}
|
||||||
|
catch(FS::FileSystemException & e)
|
||||||
|
{
|
||||||
|
qCritical() << "Failed to write instance group file :" << e.cause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InstanceList::loadGroupList(QMap<QString, QString> &groupMap)
|
void InstanceList::loadGroupList(QMap<QString, QString> &groupMap)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user