diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-10-05 23:52:23 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-10-05 23:52:23 +0200 |
commit | 4fbcb3efb90368c084946600afdca05ca7c65519 (patch) | |
tree | f24f42704fc4b47f47caf5db04635eeac806307e | |
parent | 439c6b43a3432e604afbcef74c36ae5fb73de12b (diff) | |
download | MultiMC-4fbcb3efb90368c084946600afdca05ca7c65519.tar MultiMC-4fbcb3efb90368c084946600afdca05ca7c65519.tar.gz MultiMC-4fbcb3efb90368c084946600afdca05ca7c65519.tar.lz MultiMC-4fbcb3efb90368c084946600afdca05ca7c65519.tar.xz MultiMC-4fbcb3efb90368c084946600afdca05ca7c65519.zip |
GH-1268 ... and catch the inevitable errors
-rw-r--r-- | logic/InstanceList.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/logic/InstanceList.cpp b/logic/InstanceList.cpp index 3644e828..b791cc32 100644 --- a/logic/InstanceList.cpp +++ b/logic/InstanceList.cpp @@ -177,7 +177,14 @@ void InstanceList::saveGroupList() } toplevel.insert("groups", groupsArr); QJsonDocument doc(toplevel); - FS::write(groupFileName, doc.toJson()); + try + { + 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) |