Created
July 6, 2011 18:51
-
-
Save sbrocket/1068029 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
| NSError *error = nil; | |
| if (![self myMethodThatCanFail:&error]) { | |
| NSLog(@"%@", error); | |
| } | |
| //////// | |
| - (BOOL)myMethodThatCanFail:(NSError **)errorPtr { | |
| // This method sucks so much that it always fails :( | |
| if (errorPtr != NULL) { | |
| *errorPtr = [NSError errorWithDomain:@"SomeDomain" code:1 userInfo:nil]; | |
| } | |
| return NO; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment