Skip to content

Commit b9b978e

Browse files
authored
Adds initial topic for categories of errors (#78)
resolves #20
1 parent 4091321 commit b9b978e

File tree

9 files changed

+142
-8
lines changed

9 files changed

+142
-8
lines changed

config/spellcheck/ignored_words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ baz
44
Bjarne
55
bool
66
checkmark
7+
coe
78
constexpr
89
cppreference
910
Engelhart

config/spellcheck/wordlist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
personal_ws-1.1 en 18
21
ABI
32
boolean
43
computable
@@ -10,6 +9,7 @@ metaprogramming
109
namespace
1110
namespaces
1211
ODR
12+
personal_ws-1.1 en 18
1313
preprocessor
1414
redeclarations
1515
SFINAE

sources/knowledge_areas.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ T Generic Programming (Templates)
5151
? ? ? ? Requires Clauses
5252
req-expr y y n Requires Expressions
5353
EH Error Handling
54-
? ? ? ? Classes of Errors
54+
coe y y n Categories of Errors
5555
? ? ? ? errno
5656
? ? ? ? Error Codes
5757
eh y y y Exception Handling
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## C++ compilation model: Linkage {#linkage}
2+
3+
_Skeleton descriptions are typeset in italic text,_
4+
_so please don't remove these descriptions when editing the topic._
5+
6+
This topic is currently under construction and will soon be filled with information :)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## C++ compilation model: Translation units {#translunits}
2+
3+
_Skeleton descriptions are typeset in italic text,_
4+
_so please don't remove these descriptions when editing the topic._
5+
6+
This topic is currently under construction and will soon be filled with information :)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Error handling: C-style error codes {#cerrcodes}
2+
3+
_Skeleton descriptions are typeset in italic text,_
4+
_so please don't remove these descriptions when editing the topic._
5+
6+
This topic is currently under construction and will soon be filled with information :)
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
## Error handling: Categories of errors
2+
3+
_Skeleton descriptions are typeset in italic text,_
4+
_so please don't remove these descriptions when editing the topic._
5+
6+
### Overview
7+
8+
_Provides a short natural language abstract of the module’s contents._
9+
_Specifies the different levels of teaching._
10+
11+
------------------------------------------------------------------------
12+
Level Objective
13+
----------------- ------------------------------------------------------
14+
Foundational Categories of errors
15+
16+
Main Handling different categories of errors
17+
18+
Advanced ---
19+
20+
------------------------------------------------------------------------
21+
22+
### Motivation
23+
24+
_Why is this important?_
25+
_Why do we want to learn/teach this topic?_
26+
27+
Programs can run in a normal state or erroneous state. Students should be able
28+
to identify different types of erroneous state and how to best handle them.
29+
30+
### Topic introduction
31+
32+
_Very brief introduction to the topic._
33+
34+
This topic is an umbrella topic that refers to the different topics for types of errors and error handling.
35+
36+
### Foundational: Categories of errors {#coe-found}
37+
38+
#### Background/Required Knowledge
39+
40+
A student:
41+
42+
* should know the basics about linkage [[C++ compilation model: Linkage - Foundational]][1]
43+
44+
#### Student outcomes
45+
46+
_A list of things "a student should be able to" after the curriculum._
47+
_The next word should be an action word and testable in an exam._
48+
_Max 5 items._
49+
50+
A student should be able to:
51+
52+
1. Describe different kinds of errors and exceptional situations that require different approaches of error handling.
53+
2. Provide some examples of the different error categories.
54+
3. Identify potential erroneous code sections and attribute them to different error categories.
55+
56+
57+
#### Caveats
58+
59+
_This section mentions subtle points to understand, like anything resulting in
60+
implementation-defined, unspecified, or undefined behavior._
61+
62+
No caveats at present.
63+
64+
#### Points to cover
65+
66+
_This section lists important details for each point._
67+
68+
Errors can happen at different times during software lifetime.
69+
70+
* Compile-time errors
71+
* Link-time errors
72+
* Execution-time errors
73+
74+
There are different types of errors
75+
76+
* Logic errors (violations of logical preconditions)
77+
* Run-time errors (errors during code execution due to causes that are external to the program)
78+
79+
80+
### Main: Handling different categories of errors {#coe-main}
81+
82+
#### Background/Required Knowledge
83+
84+
#### Student outcomes
85+
86+
A student should be able to:
87+
88+
1. pick the right error handling approach for a given problem.
89+
2. enumerate different error handling strategies.
90+
3. make a clear distinction between error-handling code and normal-case handling code
91+
92+
93+
#### Caveats
94+
95+
* The different error handling strategies have different trade-offs (runtime performance, readability, ...)
96+
* The trade-off space depends on the run-time context (embedded, ...)
97+
* There also exist unhandleable errors (e.g., ODR violations, undefined behavior)
98+
99+
#### Points to cover
100+
101+
* Exception handling [[Error handling: Exception handling - Foundational]][2]
102+
* Returning a value indication failure [[Error handling: C-style error-codes - Foundational]][3]
103+
* Terminating the program
104+
* Improving error handling by having the error occur at an earlier stage in the software development cycle [[Error handling: Static assert - Foundational]][4]
105+
106+
### Advanced {#coe-advanced}
107+
108+
_These are important topics that are not expected to be covered but provide
109+
guidance where one can continue to investigate this topic in more depth._
110+
111+
[1]: ../compilation-model/linkage.md
112+
[2]: ../error-handling/exception-handling.md
113+
[3]: ../error-handling/c-style-error-codes.md
114+
[4]: ../error-handling/static-assert.md

sources/modules/error-handling/exception-handling.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
## Error handling: Exception handling {#eh}
2-
3-
_Skeleton descriptions are typeset in italic text,_
4-
_so please don't remove these descriptions when editing the topic._
5-
61
### Overview
72

83
_Provides a short natural language abstract of the module’s contents._
@@ -113,4 +108,4 @@ guidance where one can continue to investigate this topic in more depth._
113108
* Writing exception safe containers
114109

115110
[1]: ../type-system/fundamental-types.md
116-
[2]: ../type-system/user-defined-types.md
111+
[2]: ../type-system/user-defined-types.md
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Error handling: Static assert {#staticassert}
2+
3+
_Skeleton descriptions are typeset in italic text,_
4+
_so please don't remove these descriptions when editing the topic._
5+
6+
This topic is currently under construction and will soon be filled with information :)

0 commit comments

Comments
 (0)