@@ -46,12 +46,13 @@ if (initialized == SIZE_MAX) return; if ((ivars = malloc(sizeof(*ivars))) == NULL) - @throw [OFOutOfMemoryException newWithClass: isa - requestedSize: sizeof(*ivars)]; + @throw [OFOutOfMemoryException + exceptionWithClass: isa + requestedSize: sizeof(*ivars)]; memset(ivars, 0, sizeof(*ivars)); ivars->cString = (char*)s; ivars->cStringLength = initialized; @@ -60,11 +61,11 @@ case 1: ivars->UTF8 = YES; break; case -1: free(ivars); - @throw [OFInvalidEncodingException newWithClass: isa]; + @throw [OFInvalidEncodingException exceptionWithClass: isa]; } s = ivars; initialized = SIZE_MAX; } @@ -73,249 +74,249 @@ * The following methods are not available since it's a constant string, which * can't be allocated or initialized at runtime. */ + alloc { - @throw [OFNotImplementedException newWithClass: self - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: self + selector: _cmd]; } - init { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUTF8String: (const char*)UTF8String { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithCString: (const char*)cString encoding: (of_string_encoding_t)encoding { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithCString: (const char*)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithString: (OFString*)string { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUnicodeString: (of_unichar_t*)string { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUnicodeString: (of_unichar_t*)string byteOrder: (of_endianess_t)byteOrder { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUnicodeString: (of_unichar_t*)string length: (size_t)length { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUnicodeString: (of_unichar_t*)string byteOrder: (of_endianess_t)byteOrder length: (size_t)length { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUTF16String: (uint16_t*)string byteOrder: (of_endianess_t)byteOrder { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUTF16String: (uint16_t*)string length: (size_t)length { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithUTF16String: (uint16_t*)string byteOrder: (of_endianess_t)byteOrder length: (size_t)length { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithFormat: (OFConstantString*)format, ... { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithFormat: (OFConstantString*)format arguments: (va_list)args { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithPath: (OFString*)firstComponent, ... { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithPath: (OFString*)firstComponent arguments: (va_list)arguments { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithContentsOfFile: (OFString*)path { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithContentsOfFile: (OFString*)path encoding: (of_string_encoding_t)encoding { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithContentsOfURL: (OFURL*)URL { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithContentsOfURL: (OFURL*)URL encoding: (of_string_encoding_t)encoding { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } /* From protocol OFSerializing */ - initWithSerialization: (OFXMLElement*)element { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } /* * The following methods are not available because constant strings are * preallocated by the compiler and thus don't have a memory pool. */ - (void)addMemoryToPool: (void*)ptr { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } - (void*)allocMemoryWithSize: (size_t)size { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } - (void*)allocMemoryForNItems: (size_t)nitems withSize: (size_t)size { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } - (void*)resizeMemory: (void*)ptr toSize: (size_t)size { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } - (void*)resizeMemory: (void*)ptr toNItems: (size_t)nitems withSize: (size_t)size { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } - (void)freeMemory: (void*)ptr { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; } /* * The following methods are unnecessary because constant strings are * singletons. @@ -339,12 +340,12 @@ { } - (void)dealloc { - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } /* * In all following methods, it is checked whether the constant string has been