Skip to content
Snippets Groups Projects
Commit 2fc3757c authored by Martin Killenberg's avatar Martin Killenberg
Browse files

ScriptedInitialisationHandler: improved wording in exception

parent 279a7716
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ namespace ChimeraTK {
}
_lastFailed = true;
std::this_thread::sleep_for(std::chrono::seconds(_errorGracePeriod));
throw ChimeraTK::runtime_error(_deviceAlias + " board initialisation failed.");
throw ChimeraTK::runtime_error(_deviceAlias + " initialisation failed.");
}
else {
output += _deviceAlias + " initialisation SUCCESS!";
......
......@@ -127,3 +127,19 @@ BOOST_FIXTURE_TEST_CASE(testError, Fixture) {
(void)std::filesystem::remove("device1Init.success");
(void)std::filesystem::remove("continueDevice1Init");
}
BOOST_AUTO_TEST_CASE(testBoostException) {
BOOST_CHECK(false);
std::filesystem::rename("deviceInitScript1.bash", "deviceInitScript1.bash.dontuse");
try {
DMapSetter dmapSetter;
TestApp testApp{"ScriptedInitApp"};
TestFacility testFacility{false};
testFacility.runApplication();
sleep(10);
}
catch(ChimeraTK::logic_error& e) {
std::cout << "I caught the exception!" << std::endl;
}
std::filesystem::rename("deviceInitScript1.bash.dontuse", "deviceInitScript1.bash");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment