Modernize the code a little

This commit is contained in:
Jonathan Schleifer 2017-05-14 02:33:26 +02:00
parent c428df9b60
commit cd3d39a9c2
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
8 changed files with 125 additions and 51 deletions

View file

@ -30,21 +30,19 @@
@implementation SSLInvalidCertificateException
@synthesize reason = _reason;
+ exceptionWithReason: (OFString *)reason
+ (instancetype)exception
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithReason: (OFString *)reason
{
return [[[self alloc] initWithReason: reason] autorelease];
}
- init
{
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
OF_INVALID_INIT_METHOD
}
- initWithReason: (OFString *)reason