Refactor the CMake file to work with CMake 3.8.2
[folly.git] / folly / ScopeGuard.h
index f56b276042e26124bb7fe980fa9eb27ff771ded2..ad96afdc4c5a37a1a9944437d1b77a9b8daba591 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();
     }
   }