From 53c6318d94a7e2b64ad0cffadde4f0e33b1f7ca1 Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Wed, 2 Oct 2024 14:59:41 -0400 Subject: [PATCH] [except.terminate] Better describe the function While 'std:terminate' was originally conceived as the way to report failures in the exception handling machinery, it has evolved to become a more general tool for reporting unrecoverable failures in the C++ runtime. This rewording attempts to address that evolving design, and in doing so addresses the outstanding %FIXME% that the current text is not adequately descriptive in the first place. --- source/exceptions.tex | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/exceptions.tex b/source/exceptions.tex index a462fe0bff..b6eae9fd95 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -1012,9 +1012,10 @@ \pnum \indextext{\idxcode{terminate}}% -% FIXME: What does it mean to abandon exception handling? -In some situations, exception handling is abandoned -for less subtle error handling techniques. +Some errors in a program cannot be recovered from, such as when an exception +is not handled or a \tcode{std::thread} object is destroyed while its thread +function is still executing. In such cases, +the function \tcode{std::terminate}\iref{exception.terminate} is invoked. \begin{note} These situations are: \indextext{\idxcode{terminate}!called}% @@ -1108,8 +1109,6 @@ \pnum \indextext{\idxcode{terminate}}% -In such cases, -the function \tcode{std::terminate} is invoked\iref{exception.terminate}. In the situation where no matching handler is found, it is \impldef{stack unwinding before invocation of \tcode{std::terminate}} whether or not the stack is unwound