Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Created October 19, 2019 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaac-weisberg/fee9e1d5fa2e816ff98943f0a68ca6c1 to your computer and use it in GitHub Desktop.
Save isaac-weisberg/fee9e1d5fa2e816ff98943f0a68ca6c1 to your computer and use it in GitHub Desktop.
extension ForecastDownloadError: ErrorTitledSingularRepresentable {
var errorTitleSingular: ErrorTitledSingularType {
switch self {
case .parsing:
return ErrorTitledSingular("Dang it", "There was a problem decoding the forecast")
case .download(let reason):
return reason.errorTitleSingular
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment