From 0c02fcf13dd1fa748e66027e5513e7d9518962ce Mon Sep 17 00:00:00 2001 From: yingtao Date: Thu, 3 May 2018 13:23:57 -0400 Subject: [PATCH] Add error messsages to sample code of storage's async removal functions in README --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c69d632..880a3c7 100644 --- a/README.md +++ b/README.md @@ -233,11 +233,19 @@ storage.async.existsObject(ofType: String.self, forKey: "my favorite city") { re } storage.async.removeAll() { result in - print("removal completes") + switch result { + case .value: + print("removal completes") + case .error(let error): + print(error) } storage.async.removeExpiredObjects() { result in - print("removal completes") + switch result { + case .value: + print("removal completes") + case .error(let error): + print(error) } ```