提交 1448c13c 编写于 作者: A Adrian Brink 提交者: Christian Noon

[PR #1315] Add `public` ACL to `BackendError` enum in the README.

Add the `public` identifier to the `BackendError` enum in the part about using Generics for Serialization.

Reason:
The extension of Request throws an error ("Method cannot be declared public because its parameter uses an internal type") unless the enum is public.
上级 b2050ef6
......@@ -718,7 +718,7 @@ Requests can be suspended, resumed, and cancelled:
Before implementing custom response serializers or object serialization methods, it's important to be prepared to handle any errors that may occur. Alamofire recommends handling these through the use of either your own `NSError` creation methods, or a simple `enum` that conforms to `ErrorType`. For example, this `BackendError` type, which will be used in later examples:
```swift
enum BackendError: ErrorType {
public enum BackendError: ErrorType {
case Network(error: NSError)
case DataSerialization(reason: String)
case JSONSerialization(error: NSError)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册