isocpp / isocpp/CppCoreGuidelines

I.10 exceptions clarification

Open
#1,222 5 comments 0 reactions 1 assignee View on GitHub

@hsutter is already working on this.

Since Jul 9, 2018.

Dominant language
CSS
Stars
45.3k
Forks
5.6k
PR merge metrics
No merged PRs in 30d

Description

As I am not a native speaker of English, the issue might have been in my side, but could somebody make the "what is an error" note a bit easier to read? After reading it a few times, I still don't understand what it is supposed to mean.

As for the section about performance not being a valid reason. I think it should be more clear here that exceptions are not supposed to be used to implement control flow.

Actually at https://softwareengineering.stackexchange.com/questions/189222/are-exceptions-as-control-flow-considered-a-serious-antipattern-if-so-why
There is a pretty clear definition by Mason Wheeler when exceptions should be used. Could we adopt something like that instead of the "what is an error" section?

The other big question that this rule is fails to answer is when to use [[nodiscard]] . As [[nodiscard]] also seems to be a good sollution for the stated reason of this rule.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.