Wrap FS::write in try catch
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
d38e7fa142
commit
d2f0d1d8d5
@ -173,7 +173,11 @@ void InstanceCopyTask::copyFinished()
|
||||
allowed_symlinks_file
|
||||
.filePath()); // we dont want to modify the original. also make sure the resulting file is not itself a link.
|
||||
|
||||
FS::write(allowed_symlinks_file.filePath(), allowed_symlinks);
|
||||
try {
|
||||
FS::write(allowed_symlinks_file.filePath(), allowed_symlinks);
|
||||
} catch (const FS::FileSystemException& e) {
|
||||
qCritical() << "Failed to write symlink :" << e.cause();
|
||||
}
|
||||
}
|
||||
|
||||
emitSucceeded();
|
||||
|
@ -164,7 +164,12 @@ void ExportToModListDialog::done(int result)
|
||||
|
||||
if (output.isEmpty())
|
||||
return;
|
||||
FS::write(output, ui->finalText->toPlainText().toUtf8());
|
||||
|
||||
try {
|
||||
FS::write(output, ui->finalText->toPlainText().toUtf8());
|
||||
} catch (const FS::FileSystemException& e) {
|
||||
qCritical() << "Failed to save mod list file :" << e.cause();
|
||||
}
|
||||
}
|
||||
|
||||
QDialog::done(result);
|
||||
|
Loading…
Reference in New Issue
Block a user