Skip to content

Commit d422594

Browse files
committed
docs/ErrorHandlingRationale.md: add table of contents
1 parent 3ea7469 commit d422594

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed

docs/ErrorHandlingRationale.md

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Error Handling Rationale and Proposal
22

3+
## Table of Contents
4+
5+
- [Fundamentals](#fundamentals)
6+
- [Kinds of propagation](#kinds-of-propagation)
7+
- [Kinds of error](#kinds-of-error)
8+
- [Simple domain errors](#simple-domain-errors)
9+
- [Recoverable errors](#recoverable-errors)
10+
- [Universal errors](#universal-errors)
11+
- [Logic failures](#logic-failures)
12+
- [Analysis](#analysis)
13+
- [Propagation methods](#propagation-methods)
14+
- [Marked propagation](#marked-propagation)
15+
- [Typed propagation](#typed-propagation)
16+
- [Typed manual propagation](#typed-manual-propagation)
17+
- [Typed automatic propagation](#typed-automatic-propagation)
18+
- [The default typing rule](#the-default-typing-rule)
19+
- [Enforcement](#enforcement)
20+
- [Specificity](#specificity)
21+
- [Tradeoffs of typed propagation](#tradeoffs-of-typed-propagation)
22+
- [Error Types](#error-types)
23+
- [Implementation design](#implementation-design)
24+
- [Implicit manual propagation](#implicit-manual-propagation)
25+
- [`setjmp` / `longjmp`](#setjmp--longjmp)
26+
- [Table-based unwinding](#table-based-unwinding)
27+
- [Clean-up actions](#clean-up-actions)
28+
- [`finally`](#finally)
29+
- [`defer`](#defer)
30+
- [Destructors](#destructors)
31+
- [Survey](#survey)
32+
- [C](#c)
33+
- [C++](#c-1)
34+
- [Objective-C](#objective-c)
35+
- [Java](#java)
36+
- [C#](#c-2)
37+
- [Haskell](#haskell)
38+
- [Rust](#rust)
39+
- [Go](#go)
40+
- [Scripting languages](#scripting-languages)
41+
- [Proposal](#proposal)
42+
- [Automatic propagation](#automatic-propagation)
43+
- [Typed propagation](#typed-propagation-1)
44+
- [Higher-order polymorphism](#higher-order-polymorphism)
45+
- [Generic polymorphism](#generic-polymorphism)
46+
- [Error type](#error-type)
47+
- [Marked propagation](#marked-propagation-1)
48+
- [Asserting markers](#asserting-markers)
49+
- [Other syntax](#other-syntax)
50+
- [Clean-up actions](#clean-up-actions-1)
51+
- [`using`](#using)
52+
- [C and Objective-C Interoperation](#c-and-objective-c-interoperation)
53+
- [Error types](#error-types-1)
54+
- [Objective-C method error patterns](#objective-c-method-error-patterns)
55+
- [Detecting an error](#detecting-an-error)
56+
- [The error parameter](#the-error-parameter)
57+
- [CoreFoundation functions](#corefoundation-functions)
58+
- [Other C APIs](#other-c-apis)
59+
- [Implementation design](#implementation-design-1)
60+
361
This paper surveys the error-handling world, analyzes various ideas
462
which have been proposed or are in practice in other languages, and
563
ultimately proposes an error-handling scheme for Swift together with
@@ -1836,10 +1894,10 @@ right thing for all but two sets of APIs in the public API:
18361894
- The `ISyncSessionDriverDelegate` category on `NSObject` declares
18371895
half-a-dozen methods like this:
18381896

1839-
```objc
1840-
- (BOOL)sessionDriver:(ISyncSessionDriver *)sender
1841-
didRegisterClientAndReturnError:(NSError **)outError;
1842-
```
1897+
```objc
1898+
- (BOOL)sessionDriver:(ISyncSessionDriver *)sender
1899+
didRegisterClientAndReturnError:(NSError **)outError;
1900+
```
18431901

18441902
Fortunately, these delegate methods were all deprecated in Lion, and
18451903
Swift currently doesn't even import deprecated methods.

0 commit comments

Comments
 (0)