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 2, 2024
1 parent 70954ed commit 425315f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,9 @@

\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 thread is destroyed while still running. 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 @@ -1112,8 +1112,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 425315f

Please sign in to comment.