@@ -18,21 +18,19 @@ #import "OFOutOfMemoryException.h" #import "OFString.h" @implementation OFOutOfMemoryException -+ (instancetype)exceptionWithClass: (Class)class - requestedSize: (size_t)requestedSize ++ (instancetype)exceptionWithRequestedSize: (size_t)requestedSize { - return [[[self alloc] initWithClass: class - requestedSize: requestedSize] autorelease]; + return [[[self alloc] + initWithRequestedSize: requestedSize] autorelease]; } -- initWithClass: (Class)class - requestedSize: (size_t)requestedSize +- initWithRequestedSize: (size_t)requestedSize { - self = [super initWithClass: class]; + self = [super init]; _requestedSize = requestedSize; return self; } @@ -39,17 +37,15 @@ - (OFString*)description { if (_requestedSize != 0) return [OFString stringWithFormat: - @"Could not allocate %zu bytes in class %@!", - _requestedSize, _inClass]; + @"Could not allocate %zu bytes!", _requestedSize]; else - return [OFString stringWithFormat: - @"Could not allocate enough memory in class %@!", _inClass]; + return @"Could not allocate enough memory!"; } - (size_t)requestedSize { return _requestedSize; } @end