PR Review comments fixed.
This commit is contained in:
parent
fe12f6855d
commit
0fd00d05db
@ -18,7 +18,7 @@ public struct ModelRegistry {
|
||||
case decoderOther(message: String)
|
||||
case decoderErrorObjectNotPresent(codingKey: CodingKey, codingPath: [CodingKey])
|
||||
case decoderErrorModelNotMapped(identifer: String? = nil, codingKey: CodingKey? = nil, codingPath: [CodingKey]? = nil)
|
||||
case decoderErrorUnexpectedType(actualType: String? = nil, expectedType: String? = nil, identifer: String? = nil, codingKey: CodingKey? = nil, codingPath: [CodingKey]? = nil)
|
||||
case decoderErrorUnexpectedType(actualType: String, expectedType: String, identifer: String, codingKey: CodingKey? = nil, codingPath: [CodingKey]? = nil)
|
||||
case duplicateRegistration(message: String)
|
||||
case other(message: String)
|
||||
case handlerNotMapped(identifer: String? = nil, categoryName: String? = nil)
|
||||
|
||||
@ -32,8 +32,8 @@ extension ModelRegistry.Error: HumanReadableDecodingErrorProtocol {
|
||||
case .decoderErrorModelNotMapped(let identifier, let codingKey, let codingPath) where identifier != nil && codingKey != nil && codingPath != nil:
|
||||
return "Model identifier \"\(identifier!)\" is not mapped for \"\(codingKey!.stringValue)\" @ \(codingPath!.map { return $0.stringValue })"
|
||||
|
||||
case .decoderErrorUnexpectedType(let actualType, let expectedType, let identifier, let codingKey, let codingPath) where actualType != nil && expectedType != nil && identifier != nil && codingKey != nil && codingPath != nil:
|
||||
return "Model identifier \"\(identifier!)\" has unexpected type \"\(actualType!)\" expected type \"\(expectedType!)\" for \"\(codingKey!.stringValue)\" @ \(codingPath!.map { return $0.stringValue })"
|
||||
case .decoderErrorUnexpectedType(let actualType, let expectedType, let identifier, let codingKey, let codingPath) where codingKey != nil && codingPath != nil:
|
||||
return "Model identifier \"\(identifier)\" has unexpected type \"\(actualType)\" expected type \"\(expectedType)\" for \"\(codingKey!.stringValue)\" @ \(codingPath!.map { return $0.stringValue })"
|
||||
|
||||
case .decoderErrorObjectNotPresent(let codingKey, let codingPath):
|
||||
return "Required model \"\(codingKey.stringValue)\" was not found @ \(codingPath.map { return $0.stringValue })"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user