Explain crash when exception is thrown from Scope Guard
authorPhil Willoughby <philwill@fb.com>
Fri, 18 Nov 2016 16:08:19 +0000 (08:08 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 18 Nov 2016 16:23:48 +0000 (08:23 -0800)
Summary:
Print a message to `std::cerr` when the current program is about to call `std::terminate` because a `folly::ScopeGuard` callback threw an exception. This goes to `std::terminate` in the (common) cases when the `ScopeGuard` destructor is `noexcept`

This gives the user a small clue as to what just happened, since the default diagnostics for this on some platforms do not help at all.

Reviewed By: nbronson

Differential Revision: D4061096

fbshipit-source-id: c3b534d4a36b095e08e46f375251b6fd416ccd68


No differences found