Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion folly/Executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,12 @@ class Executor {
}

template <typename F>
FOLLY_ERASE static void invokeCatchingExns(char const* p, F f) noexcept {
FOLLY_ERASE static void invokeCatchingExns(char const* p, F f) {
#if 0
catch_exception(f, invokeCatchingExnsLog, p);
#else
f();
#endif
}

protected:
Expand Down
5 changes: 4 additions & 1 deletion folly/executors/test/SerialExecutorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ TYPED_TEST(SerialExecutorTest, RecursiveAddInline) {
recursiveAddTest<TypeParam>(folly::InlineExecutor::instance());
}

TYPED_TEST(SerialExecutorTest, ExecutionThrows) {
// MB-44253: Disabled - unhandled exceptions in tasks are no longer caught
// (invokeCatchingExns is a no-op on this branch), so this test would
// std::terminate.
TYPED_TEST(SerialExecutorTest, DISABLED_ExecutionThrows) {
auto executor = TypeParam::create();

// an empty Func will throw std::bad_function_call when invoked,
Expand Down
5 changes: 4 additions & 1 deletion folly/executors/test/ThreadedExecutorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ TEST_F(ThreadedExecutorTest, example) {
EXPECT_EQ("42", ret);
}

TEST_F(ThreadedExecutorTest, exception) {
// MB-44253: Disabled - unhandled exceptions in tasks are no longer caught
// (invokeCatchingExns is a no-op on this branch), so this test would
// std::terminate.
TEST_F(ThreadedExecutorTest, DISABLED_exception) {
folly::ThreadedExecutor x;
x.add([] { throw std::runtime_error("This should not crash the program"); });
}
Expand Down
Loading