修复文章格式错误

This commit is contained in:
WAMaker
2018-11-06 16:48:18 +08:00
parent dc10749c04
commit f0ef29ef58

View File

@ -195,7 +195,7 @@ do {
// 打印 "Invalid selection, out of stock, or not enough money."
```
如果 `vend(itemNamed:)` 抛出的是一个 `VendingMachineError` 类型的错误, `nourish(with:)` 会打印一条消息,否则 `nourish(with:)`·将错误抛给它的调用方。这个错误之后会被通用的 `catch` 语句捕获。
如果 `vend(itemNamed:)` 抛出的是一个 `VendingMachineError` 类型的错误,`nourish(with:)` 会打印一条消息,否则 `nourish(with:)` 会将错误抛给它的调用方。这个错误之后会被通用的 `catch` 语句捕获。
### 将错误转换成可选值