From 86b83461fc47b591b9e873e36ceabe4efa03e11f Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 5 Aug 2016 09:48:30 -0700 Subject: [PATCH] Don't throw in the Watchdog destructor Summary: As-of C++11, destructors are assumed to be `noexcept` unless explicitly marked otherwise. `Watchdog`'s destructor throws, so switch it to a `LOG(FATAL)` instead. Reviewed By: andriigrynenko Differential Revision: D3672621 fbshipit-source-id: 5224ecf85d101462e02e12da257e033bab4db1a1 --- folly/test/SingletonTestStructs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/SingletonTestStructs.h b/folly/test/SingletonTestStructs.h index e0c0b97a..fecf5373 100644 --- a/folly/test/SingletonTestStructs.h +++ b/folly/test/SingletonTestStructs.h @@ -39,7 +39,7 @@ struct Watchdog { ~Watchdog() { if (creation_order().back() != this) { - throw std::out_of_range("Watchdog destruction order mismatch"); + LOG(FATAL) << "Watchdog destruction order mismatch"; } creation_order().pop_back(); } -- 2.34.1