Created
January 17, 2022 13:53
-
-
Save Zlobrynya/488cc2ba8eef8d147f8da97ea31d11f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum WeatherError: LocalizedError { | |
case cityIsInTheListAlready(String) | |
case noLocationAccess(String) | |
case nothingFound | |
var localizedDescription: String { | |
switch self { | |
case .cityIsInTheListAlready(let string): return "Error Description" | |
case .noLocationAccess(let string): return "Error Description" | |
case .nothingFound: return "Ooops.. Nothing found!" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment