KhronosGroup / KhronosGroup/KSCAF_DocGuidelines

An SC API should not allow/encourage use of C++ exception handling (Bug 16057)

Open
#10 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

illya@codeplay.com 2016-10-10 01:20:51 PDT

C++ exception handling in todays compilers is not fully defined, behaviour between compilers is not the same. An API should not encourage exception handling to cross the API line.

Bjarne Stroustrup would not fly a plane if it had exception handling implemented.

Discuss.

Comment 1 illya@codeplay.com 2016-10-10 01:22:40 PDT

I´d like to add throwing exceptions is ok according to most code standards I´ve been through, while catching them is not. Maybe that is what you mean by ”exception handling”. We´d put ourselves in an unholy mess if an API may never throw FPE or bad_alloc, right?!

I also think ”positive” wording is better suited for any requirement/guideline, i.e. specify allowable behavior as opposed to specifying prohibited behavior. Maybe that should be a guideline in itself…

Regards
Andreas Urbán

Comment 2 illya@codeplay.com 2016-10-10 01:23:42 PDT

Right. It’s Real Difficult to create a test which shows that a negative statement is true.

Robert Schulman

Comment 3 Erik Noreke 2016-10-10 07:49:55 PDT

Reference the industry standards that mentions this.

Accepted 2016-10-10.

Cary to make a list.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the issue discussion and the industry standards it asks to reference, then determine the intended positive guidance for exception behavior across an SC API boundary. Done means the guideline has agreed wording and a supporting list of applicable industry standards; no file or test is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.