Skip to content

Commit

Permalink
Kein Absturz beim Laden nicht existierender Dateien
Browse files Browse the repository at this point in the history
  • Loading branch information
zusitools committed Jan 5, 2018
1 parent b132444 commit 1d57f3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mainwindow.cpp
Expand Up @@ -7,6 +7,7 @@
#include <QActionGroup>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>
#include <QMimeData>
#include <QTime>
#include <QDebug>
Expand Down Expand Up @@ -274,7 +275,11 @@ void MainWindow::oeffneStrecken(const QStringList& dateinamen)
}

for (auto& fut : futures) {
this->m_strecken.push_back(fut.get());
try {
this->m_strecken.push_back(fut.get());
} catch (const std::exception& e) {
QMessageBox::warning(this, "Fehler beim Laden der Strecke", e.what());
}
}

qDebug() << timer.elapsed() << "ms zum Lesen der Strecken";
Expand Down
2 changes: 1 addition & 1 deletion zusi_file_lib

0 comments on commit 1d57f3f

Please sign in to comment.