X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FScopeGuard.h;h=ad96afdc4c5a37a1a9944437d1b77a9b8daba591;hb=0e7c824d239f6668be1afb2ffd334f89ce294c80;hp=f56b276042e26124bb7fe980fa9eb27ff771ded2;hpb=ae7e1fd07dc2c01baf23c294598fcc839c1e7c23;p=folly.git diff --git a/folly/ScopeGuard.h b/folly/ScopeGuard.h index f56b2760..ad96afdc 100644 --- a/folly/ScopeGuard.h +++ b/folly/ScopeGuard.h @@ -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 FOLLY_ALWAYS_INLINE static void runAndWarnAboutToCrashOnException( - T& function) { + T& function) noexcept { try { function(); } catch (...) { warnAboutToCrash(); - throw; + std::terminate(); } }