Skip to content

Commit a7ac96a

Browse files
emphasise cancellation not triggering catch (mxcl#1271)
as discussed
1 parent 604a83f commit a7ac96a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Documentation/CommonPatterns.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,9 @@ want to enable that behavior. In cases where you do want cancellation, the exact
283283
that it should work will vary depending on how the underlying task supports cancellation.
284284
PromiseKit provides cancellation primitives but no concrete API.
285285

286-
Cancelled chains do not call `catch` handlers by default. However you can
287-
intercept cancellation if you like:
286+
**Important**: Errors which conform to the `CancellableError` protocol do *not* normally trigger the `.catch` block.
287+
Cancelation is neither success nor failure, so cancelled chains do not call `catch` handlers by default.
288+
However you can intercept cancellation if you like:
288289

289290
```swift
290291
foo.then {

0 commit comments

Comments
 (0)