Use std::terminate rather than throwing in a noexcept function
authorChristopher Dykes <cdykes@fb.com>
Tue, 29 Nov 2016 05:23:33 +0000 (21:23 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Tue, 29 Nov 2016 05:38:26 +0000 (21:38 -0800)
Summary: Because MSVC isn't happy about it and generates a warning with a lot of context.

Reviewed By: yfeldblum

Differential Revision: D4242688

fbshipit-source-id: b1e26c9e3b58e7bac0e00ab8959358010fa610e8

folly/ScopeGuard.h

index 26531cd87c9e626c836299bbbafbd58148a159ed..2c71c5b9ac3db76ae07c3e2f5e79e5fd6cdd568b 100644 (file)
@@ -83,7 +83,7 @@ class ScopeGuardImplBase {
       function();
     } catch (...) {
       warnAboutToCrash();
-      throw;
+      std::terminate();
     }
   }