diff --git a/src/futures/promise_test.cc b/src/futures/promise_test.cc index 80494a8..db6f6dc 100644 --- a/src/futures/promise_test.cc +++ b/src/futures/promise_test.cc @@ -41,13 +41,17 @@ TEST(Future, Except) auto p = sled::Promise(); p.Resolve(1); p.GetFuture() - .Then([](int) { throw std::runtime_error("test"); }) + .Then([](int) { + return 1; + // throw std::runtime_error("test"); + }) .Except([](std::exception_ptr e) { try { std::rethrow_exception(e); } catch (const std::exception &e) { EXPECT_STREQ(e.what(), "test"); } + return false; }) .Get(); }