Skip to content

Commit 0c02fcf

Browse files
committed
Add error messsages to sample code of storage's async removal functions in README
1 parent b6e7b35 commit 0c02fcf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,19 @@ storage.async.existsObject(ofType: String.self, forKey: "my favorite city") { re
233233
}
234234

235235
storage.async.removeAll() { result in
236-
print("removal completes")
236+
switch result {
237+
case .value:
238+
print("removal completes")
239+
case .error(let error):
240+
print(error)
237241
}
238242

239243
storage.async.removeExpiredObjects() { result in
240-
print("removal completes")
244+
switch result {
245+
case .value:
246+
print("removal completes")
247+
case .error(let error):
248+
print(error)
241249
}
242250
```
243251

0 commit comments

Comments
 (0)