Unbreak folly on x86-32
[folly.git] / folly / ScopeGuard.h
index f56b276042e26124bb7fe980fa9eb27ff771ded2..a8c269147a068ae948d56cf155244f05d3ad250a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -78,12 +78,12 @@ class ScopeGuardImplBase {
 
   template <typename T>
   FOLLY_ALWAYS_INLINE static void runAndWarnAboutToCrashOnException(
-      T& function) {
+      T& function) noexcept {
     try {
       function();
     } catch (...) {
       warnAboutToCrash();
-      throw;
+      std::terminate();
     }
   }
 
@@ -280,7 +280,7 @@ operator+(detail::ScopeGuardOnExit, FunctionType&& fn) {
 }
 } // namespace detail
 
-} // folly
+} // namespace folly
 
 #define SCOPE_EXIT \
   auto FB_ANONYMOUS_VARIABLE(SCOPE_EXIT_STATE) \