Skip to content
Snippets Groups Projects
Commit ec496afd authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

Allow TestsStalled exception to be caught by making it public.

parent dde222ee
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,14 @@ namespace ChimeraTK {
std::string getQualifiedName() const override {
return "/" + _name;
}
/** Special exception class which will be thrown if tests with the testable mode are stalled. Normally this
* exception should never be caught. The only reason for catching it might be a situation where the expected
* behaviour of an app is to do nothing and one wants to test this. Note that the stall condition only appears
* after a certain timeout, thus tests relying on this will take time.
*
* This exception must not be based on a generic exception class to prevent catching it unintentionally. */
class TestsStalled {};
protected:
......
......@@ -926,9 +926,7 @@ void Application::testableModeLock(const std::string& name) {
std::cout << std::endl;
}
}
// throw an exception which cannot be caught (other than with catch all). This makes sure that the tests fail
// properly
class TestsStalled {};
// throw a specialised exception to make sure whoever catches it really knows what he does...
throw TestsStalled();
}
}
......
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