Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW
Refs: #4834
Change-Id: I1f9a614c83954873888d13c7b2b17a4fbff81058
diff --git a/tests/unit/util/scheduler.t.cpp b/tests/unit/util/scheduler.t.cpp
index 49c90b6..d8335c4 100644
--- a/tests/unit/util/scheduler.t.cpp
+++ b/tests/unit/util/scheduler.t.cpp
@@ -85,7 +85,12 @@
class MyException : public std::exception
{
};
- scheduler.scheduleEvent(10_ms, [] { BOOST_THROW_EXCEPTION(MyException()); });
+ scheduler.scheduleEvent(10_ms, [] {
+ // use plain 'throw' to ensure that Scheduler does not depend on the
+ // internal machinery of NDN_THROW and that it can catch all exceptions
+ // regardless of how they are thrown by the application
+ throw MyException{};
+ });
bool isCallbackInvoked = false;
scheduler.scheduleEvent(20_ms, [&isCallbackInvoked] { isCallbackInvoked = true; });