Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[except.uncaught] Tidy the specification for uncaught exceptions #7276

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlisdairM
Copy link
Contributor

@AlisdairM AlisdairM commented Oct 1, 2024

Several concurrent fixes. First include the normative wording that 'uncaught_exceptions' returns the number of uncaught exceptions on the current thread. This wording is present in the core language.

Then move the core wording for when an exception is uncaught directly into the text that talks about caught and uncaught exceptions. In the process, turn the reference to into a note, so that there is only one normative specification.

Finally, remove [except.uncaught] as it is now empty, and add the missing descriptive sentence to the intro paragraph of [except.special.general]. This happens to produce quite a pleasing page-break, but that is just luck, not design.

@AlisdairM AlisdairM force-pushed the tidy_uncaught_exceptions branch 2 times, most recently from c3ea389 to 3974f00 Compare October 1, 2024 16:09
@AlisdairM
Copy link
Contributor Author

One last tweak to update the comment in xrefdelta.tex to reference the correct PR number, and to move the first paragraph on uncaught exceptions up one, so that there is a much clearer flow from creating the exception object, being uncaught, then caught, then rethrown, before talking about what happens when an exception is uncaught.

I should be done pushing updates to this PR until I get reviews now :)

@@ -317,6 +317,15 @@
the selected constructor is odr-used\iref{basic.def.odr} and
the destructor of \tcode{T} is potentially invoked\iref{class.dtor}.

\pnum
An exception is considered uncaught
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're at it, this looks like a definition and presumably should be formatted and indexed as one (exception, uncaught).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Added indexing, rebased, and force-pushed.

Several concurrent fixes.  First include the normative wording
that 'uncaught_exceptions' returns the number of uncaught
exceptions *on the current thread*.  This wording is present
in the core language.

Then move the core wording for when an exception is uncaught
directly into the text that talks about caught and uncaught
exceptions.  In the process, turn the reference to
 into a note, so that there is only
one normative specification.

Finally, remove [except.uncaught] as it is now empty, and add
the missing descriptive sentence to the intro paragraph of
[except.special.general].  This happens to produce quite a
pleasing page-break, but that is just luck, not design.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants