From c701c2f3d21989d026367012fc0b646bf7581047 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 11 Oct 2021 16:09:23 +0200 Subject: [PATCH] Test: [skip ci] handle std. and unknown exceptions in unit test dialog --- src/Mod/Test/Gui/UnitTestImp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Test/Gui/UnitTestImp.cpp b/src/Mod/Test/Gui/UnitTestImp.cpp index 5b34ce1988..a70f8602d7 100644 --- a/src/Mod/Test/Gui/UnitTestImp.cpp +++ b/src/Mod/Test/Gui/UnitTestImp.cpp @@ -192,6 +192,12 @@ void UnitTestDialog::on_startButton_clicked() catch (const Base::Exception& e) { showErrorDialog("Exception", e.what()); } + catch (const std::exception& e) { + showErrorDialog("C++ standard exception", e.what()); + } + catch (...) { + showErrorDialog("Unknown exception", "Unknown exception raised"); + } ui->startButton->setEnabled(true); }