mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 13:53:51 +00:00
Made missing data files dialog less scary and added exception handling for esmreader
This commit is contained in:
parent
b46a2bfa01
commit
0b517d15c1
1 changed files with 56 additions and 49 deletions
|
@ -222,7 +222,7 @@ void DataFilesPage::setupDataFiles()
|
||||||
|
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setWindowTitle("Error detecting Morrowind installation");
|
msgBox.setWindowTitle("Error detecting Morrowind installation");
|
||||||
msgBox.setIcon(QMessageBox::Critical);
|
msgBox.setIcon(QMessageBox::Warning);
|
||||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||||
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
|
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
|
||||||
The directory containing the Data Files was not found.<br><br> \
|
The directory containing the Data Files was not found.<br><br> \
|
||||||
|
@ -279,6 +279,8 @@ void DataFilesPage::setupDataFiles()
|
||||||
const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
|
const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
|
||||||
|
|
||||||
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) {
|
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) {
|
||||||
|
|
||||||
|
try {
|
||||||
ESMReader fileReader;
|
ESMReader fileReader;
|
||||||
QStringList availableMasters; // Will contain all found masters
|
QStringList availableMasters; // Will contain all found masters
|
||||||
|
|
||||||
|
@ -346,6 +348,11 @@ void DataFilesPage::setupDataFiles()
|
||||||
currentItem->appendRow(child);
|
currentItem->appendRow(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch(std::runtime_error &e) {
|
||||||
|
// An error occurred while reading the .esp
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readConfig();
|
readConfig();
|
||||||
|
|
Loading…
Reference in a new issue