Created
June 12, 2015 18:07
-
-
Save tapbots/dca07d5dc59fb556e7f3 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
// Stolen from Tumblr | |
#define PTH_INVALID_INITIALIZER(initDeclaration) \ | |
_Pragma("clang diagnostic push") \ | |
_Pragma("clang diagnostic ignored \"-Wobjc-designated-initializers\"") \ | |
- (instancetype)initDeclaration { \ | |
@throw [[NSException alloc] initWithName:@"Invalid initializer" reason:[NSString stringWithFormat:@"The initializer %s is not available.", __PRETTY_FUNCTION__] userInfo:nil]; \ | |
return nil; \ | |
} \ | |
_Pragma("clang diagnostic pop") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment