aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 13:38:32 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 17:03:11 -0700
commit2a5d291bd940ea61b8254eb78b478ae86ed17f59 (patch)
tree1c5ccfa495c4393a540e7097f52c63b7402f746b /launcher/modplatform
parente2a65a70779a66471d98a98a1cc611fcb9bb0d5b (diff)
downloadPrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.tar.gz
PrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.tar.bz2
PrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.zip
fix: toml without exceptions usage
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/modplatform')
-rw-r--r--launcher/modplatform/packwiz/Packwiz.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/launcher/modplatform/packwiz/Packwiz.cpp b/launcher/modplatform/packwiz/Packwiz.cpp
index 510c7309..967b8870 100644
--- a/launcher/modplatform/packwiz/Packwiz.cpp
+++ b/launcher/modplatform/packwiz/Packwiz.cpp
@@ -241,12 +241,13 @@ auto V1::getIndexForMod(QDir& index_dir, QString slug) -> Mod
return {};
}
#else
- table = toml::parse_file(StringUtils::toStdString(index_dir.absoluteFilePath(real_fname)));
- if (!table) {
+ toml::parse_result result = toml::parse_file(StringUtils::toStdString(index_dir.absoluteFilePath(real_fname)));
+ if (!result) {
qWarning() << QString("Could not open file %1!").arg(normalized_fname);
- qWarning() << "Reason: " << QString(table.error().what());
+ qWarning() << "Reason: " << result.error().description();
return {};
}
+ table = result.table();
#endif
// index_file.close();