mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 04:41:35 +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;
|
||||
msgBox.setWindowTitle("Error detecting Morrowind installation");
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||
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> \
|
||||
|
@ -279,6 +279,8 @@ void DataFilesPage::setupDataFiles()
|
|||
const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
|
||||
|
||||
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) {
|
||||
|
||||
try {
|
||||
ESMReader fileReader;
|
||||
QStringList availableMasters; // Will contain all found masters
|
||||
|
||||
|
@ -346,6 +348,11 @@ void DataFilesPage::setupDataFiles()
|
|||
currentItem->appendRow(child);
|
||||
}
|
||||
}
|
||||
|
||||
} catch(std::runtime_error &e) {
|
||||
// An error occurred while reading the .esp
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
readConfig();
|
||||
|
|
Loading…
Reference in a new issue