From: Christopher Dykes Date: Fri, 5 Aug 2016 16:48:30 +0000 (-0700) Subject: Don't throw in the Watchdog destructor X-Git-Tag: v2016.08.08.00~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86b83461fc47b591b9e873e36ceabe4efa03e11f;p=folly.git 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 --- 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(); }