Răsfoiți Sursa

Add doc for PropagationError

onevcat 6 ani în urmă
părinte
comite
e8804c90d3
1 a modificat fișierele cu 12 adăugiri și 5 ștergeri
  1. 12 5
      Sources/General/KingfisherManager.swift

+ 12 - 5
Sources/General/KingfisherManager.swift

@@ -52,6 +52,18 @@ public struct RetrieveImageResult {
     public let originalSource: Source
     public let originalSource: Source
 }
 }
 
 
+/// A struct that stores some related information of an `KingfisherError`. It provides some context information for
+/// a pure error so you can identify the error easier.
+public struct PropagationError {
+
+    /// The `Source` to which current `error` is bound.
+    public let source: Source
+
+    /// The actual error happens in framework.
+    public let error: KingfisherError
+}
+
+
 /// The downloading task updated block type. The parameter `newTask` is the updated new task of image setting process.
 /// The downloading task updated block type. The parameter `newTask` is the updated new task of image setting process.
 /// It is a `nil` if the image loading does not require an image downloading process. If an image downloading is issued,
 /// It is a `nil` if the image loading does not require an image downloading process. If an image downloading is issued,
 /// this value will contain the actual `DownloadTask` for you to keep and cancel it later if you need.
 /// this value will contain the actual `DownloadTask` for you to keep and cancel it later if you need.
@@ -531,11 +543,6 @@ public class KingfisherManager {
     }
     }
 }
 }
 
 
-public struct PropagationError {
-    let source: Source
-    let error: KingfisherError
-}
-
 struct RetrievingContext {
 struct RetrievingContext {
 
 
     var options: KingfisherParsedOptionsInfo
     var options: KingfisherParsedOptionsInfo