@@ -20,21 +20,21 @@ #import "OFString.h" #import "OFNotImplementedException.h" @implementation OFException -+ newWithClass: (Class)class_ ++ exceptionWithClass: (Class)class_ { - return [[self alloc] initWithClass: class_]; + return [[[self alloc] initWithClass: class_] autorelease]; } - init { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithClass: (Class)class_ { self = [super init]; @@ -58,12 +58,6 @@ - (OFString*)description { return @"An exception occurred"; } - -- autorelease -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} @end