1pod
HRSCustomErrorHandling is a small Framework that provides a base implementation for error handling in iOS applications. It deals with the problem to streamline the presentation of errors in various parts of an application as well as provide APIs to implement error specific recovery options the user of the application can choose from.
The presentation of an error is reduced to a single line of code that can be called from any view, view controller or any other class that inherits from UIResponder
:
[self presentError:error completionHandler:^(BOOL didRecover) {
if (didRecover) {
[self tryAgain];
}
}];
This is all the code you need to implement in your view controllers if an operation that returns an NSError
fails.
License: Apache 2