This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

372. Inconsistent description of stdlib exceptions

Section: 16.4.6.13 [res.on.exception.handling], 17.7.3 [type.info] Status: NAD Submitter: Randy Maddox Opened: 2002-07-22 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [res.on.exception.handling].

View all other issues in [res.on.exception.handling].

View all issues with NAD status.

Discussion:

Paragraph 3 under clause 16.4.6.13 [res.on.exception.handling], Restrictions on Exception Handling, states that "Any other functions defined in the C++ Standard Library that do not have an exception-specification may throw implementation-defined exceptions unless otherwise specified." This statement is followed by a reference to footnote 178 at the bottom of that page which states, apparently in reference to the C++ Standard Library, that "Library implementations are encouraged (but not required) to report errors by throwing exceptions from (or derived from) the standard exceptions."

These statements appear to be in direct contradiction to clause 17.7.3 [type.info], which states "The class exception defines the base class for the types of objects thrown as exceptions by the C++ Standard library components ...".

Is this inconsistent?

Proposed resolution:

Rationale:

Clause 17 is setting the overall library requirements, and it's clear and consistent. This sentence from Clause 18 is descriptive, not setting a requirement on any other class.