ErrorWithCause: add .code and .domain

This commit is contained in:
Marc Rousavy
2021-02-23 15:59:07 +01:00
parent d60a3a34bc
commit 934106e837
3 changed files with 22 additions and 1 deletions

View File

@@ -463,7 +463,12 @@ final class CameraView: UIView {
var causeDictionary: [String: Any]?
if let cause = cause {
causeDictionary = ["message": cause.localizedDescription, "details": cause.userInfo]
causeDictionary = [
"code": cause.code,
"domain": cause.domain,
"message": cause.localizedDescription,
"details": cause.userInfo
]
}
onError([
"code": error.code,