Index: src/OFExceptions.m ================================================================== --- src/OFExceptions.m +++ src/OFExceptions.m @@ -121,16 +121,10 @@ { return [[self alloc] initWithClass: class__ size: size]; } -- initWithClass: (Class)class__ -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - - initWithClass: (Class)class__ size: (size_t)size { self = [super initWithClass: class__]; @@ -142,13 +136,18 @@ - (OFString*)string { if (string != nil) return string; - string = [[OFString alloc] initWithFormat: - @"Could not allocate %zu bytes in class %s!", req_size, - [class_ className]]; + if (req_size) + string = [[OFString alloc] initWithFormat: + @"Could not allocate %zu bytes in class %s!", req_size, + [class_ className]]; + else + string = [[OFString alloc] initWithFormat: + @"Could not allocate enough memory in class %s!", + [class_ className]]; return string; } - (size_t)requestedSize