Created
March 29, 2018 19:50
-
-
Save bill350/5dff699d0102d2f2078f8308072561ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/// Errors prompting protocol at its core | |
protocol FailableCore { | |
/// Show an error | |
func showError(_ error: Swift.Error?) | |
} | |
/// Failable protocol to display error | |
protocol Failable: FailableCore { | |
var errorScreenType: ErrorScreen? {get} | |
var errorContext: ErrorContext {get} | |
/// Show an error using an error view with a retry option | |
func showError<T: ErrorDisplayable>(_ error: Swift.Error?, errorView: T.Type, _ reloadable: Reloadable) | |
/// Show an error with a retry button | |
func showError(_ error: Swift.Error?, _ reloadable: Reloadable & Failable) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment