Skip to content

Commit

Permalink
[except.terminate] Better describe the function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AlisdairM committed Oct 21, 2024
1 parent e0576ed commit 53c6318
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}%
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 53c6318

Please sign in to comment.