[util] Note: Y_SCORE_EXIT, Y_DEFER, TScopeGuard will call `std::terminate` if exception is thrown and leaves the outermost block
Note: mandatory check (NEED_CHECK) was skipped
@@ -43,15 +43,15 @@ namespace NPrivate {
// General implementaion of RAII idiom (resource acquisition is initialization). Executes
// function upon return from the current scope.
//
-// @note expects `body` to provide no-throw guarantee, otherwise behaviour is unspecified (e.g
-// exception in d-tor may happen which typically results in a sigfault).
+// @note expects `body` to provide no-throw guarantee, otherwise whenever an exception
+// is thrown and leaves the outermost block of `body`, the function `std::terminate` is called.
// @see http://drdobbs.com/184403758 for detailed motivation.
#define Y_SCOPE_EXIT(...) const auto Y_GENERATE_UNIQUE_ID(scopeGuard) Y_DECLARE_UNUSED = ::NPrivate::TMakeGuardHelper{} | [__VA_ARGS__]() mutable -> void
// \brief `Y_DEFER { body };`
//
// Same as `Y_SCOPE_EXIT` but doesn't require user to provide capture-list explicitly (it
-// implicitly uses `[u]` capture). Have same requirements for `body`.
+// implicitly uses `[&]` capture). Have same requirements for `body`.
//
// Inspired by `defer` statement in languages like Swift and Go.
//
