Index: ObjFW.xcodeproj/project.pbxproj ================================================================== --- ObjFW.xcodeproj/project.pbxproj +++ ObjFW.xcodeproj/project.pbxproj @@ -148,11 +148,10 @@ 4B3D23C21337FC8300DD29B8 /* OFDataArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6799601099E7C50041064A /* OFDataArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C31337FC8300DD29B8 /* OFDataArray+Hashing.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BE17AD912FD746D002CEB0B /* OFDataArray+Hashing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C41337FC8300DD29B8 /* OFDate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BE5F0D912DF4225005C7A0C /* OFDate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C51337FCB000DD29B8 /* OFDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6799621099E7C50041064A /* OFDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C61337FCB000DD29B8 /* OFEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B0108C910EB8C9300631877 /* OFEnumerator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B3D23C71337FCB000DD29B8 /* OFExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6799641099E7C50041064A /* OFExceptions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C81337FCB000DD29B8 /* OFFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6799661099E7C50041064A /* OFFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23C91337FCB000DD29B8 /* OFHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF1BCC011C9663F0025511F /* OFHash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23CA1337FCB000DD29B8 /* OFHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B99250F12E0780000215DBE /* OFHTTPRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23CB1337FCB000DD29B8 /* OFList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B67996C1099E7C50041064A /* OFList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23CC1337FCB000DD29B8 /* OFMD5Hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF1BCC211C9663F0025511F /* OFMD5Hash.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -423,11 +422,10 @@ 4B67995D1099E7C50041064A /* OFAutoreleasePool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFAutoreleasePool.m; path = src/OFAutoreleasePool.m; sourceTree = ""; }; 4B6799601099E7C50041064A /* OFDataArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDataArray.h; path = src/OFDataArray.h; sourceTree = ""; }; 4B6799611099E7C50041064A /* OFDataArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDataArray.m; path = src/OFDataArray.m; sourceTree = ""; }; 4B6799621099E7C50041064A /* OFDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDictionary.h; path = src/OFDictionary.h; sourceTree = ""; }; 4B6799631099E7C50041064A /* OFDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDictionary.m; path = src/OFDictionary.m; sourceTree = ""; }; - 4B6799641099E7C50041064A /* OFExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFExceptions.h; path = src/OFExceptions.h; sourceTree = ""; }; 4B6799661099E7C50041064A /* OFFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFFile.h; path = src/OFFile.h; sourceTree = ""; }; 4B6799671099E7C50041064A /* OFFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFFile.m; path = src/OFFile.m; sourceTree = ""; }; 4B67996C1099E7C50041064A /* OFList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFList.h; path = src/OFList.h; sourceTree = ""; }; 4B67996D1099E7C50041064A /* OFList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFList.m; path = src/OFList.m; sourceTree = ""; }; 4B67996F1099E7C50041064A /* OFMutableArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFMutableArray.h; path = src/OFMutableArray.h; sourceTree = ""; }; @@ -766,11 +764,10 @@ 4BE5F0DA12DF4225005C7A0C /* OFDate.m */, 4B6799621099E7C50041064A /* OFDictionary.h */, 4B6799631099E7C50041064A /* OFDictionary.m */, 4B0108C910EB8C9300631877 /* OFEnumerator.h */, 4B0108CA10EB8C9300631877 /* OFEnumerator.m */, - 4B6799641099E7C50041064A /* OFExceptions.h */, 4B6799661099E7C50041064A /* OFFile.h */, 4B6799671099E7C50041064A /* OFFile.m */, 4BF1BCC011C9663F0025511F /* OFHash.h */, 4BF1BCC111C9663F0025511F /* OFHash.m */, 4B99250F12E0780000215DBE /* OFHTTPRequest.h */, @@ -938,11 +935,10 @@ 4B3D23C31337FC8300DD29B8 /* OFDataArray+Hashing.h in Headers */, 4B3D23C41337FC8300DD29B8 /* OFDate.h in Headers */, 4B3D23C51337FCB000DD29B8 /* OFDictionary.h in Headers */, 4B3D23C61337FCB000DD29B8 /* OFEnumerator.h in Headers */, 4B17FF74133A2AAB003E6DCD /* OFException.h in Headers */, - 4B3D23C71337FCB000DD29B8 /* OFExceptions.h in Headers */, 4B3D23C81337FCB000DD29B8 /* OFFile.h in Headers */, 4B3D23C91337FCB000DD29B8 /* OFHash.h in Headers */, 4B3D23CA1337FCB000DD29B8 /* OFHTTPRequest.h in Headers */, 4B3D23CB1337FCB000DD29B8 /* OFList.h in Headers */, 4B3D23CC1337FCB000DD29B8 /* OFMD5Hash.h in Headers */, Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -49,11 +49,10 @@ of_asprintf.m \ unicode.m INCLUDES := ${SRCS:.m=.h} \ OFCollection.h \ - OFExceptions.h \ ObjFW.h \ asprintf.h \ ${ATOMIC_H} \ macros.h \ objfw-defs.h \ Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -23,11 +23,12 @@ #import "OFApplication.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFNotImplementedException.h" #include #ifdef __MACH__ # include Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -20,11 +20,14 @@ #import "OFArray.h" #import "OFDataArray.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" @implementation OFArray + array { Index: src/OFAutoreleasePool.m ================================================================== --- src/OFAutoreleasePool.m +++ src/OFAutoreleasePool.m @@ -18,11 +18,13 @@ #include #import "OFAutoreleasePool.h" #import "OFArray.h" -#import "OFExceptions.h" + +#import "OFInitializationFailedException.h" +#import "OFNotImplementedException.h" #ifdef OF_THREADS # import "threading.h" static of_tlskey_t first_key, last_key; #else Index: src/OFBlock.m ================================================================== --- src/OFBlock.m +++ src/OFBlock.m @@ -25,11 +25,14 @@ #if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__) # import #endif #import "OFBlock.h" -#import "OFExceptions.h" + +#import "OFAllocFailedException.h" +#import "OFNotImplementedException.h" + #ifdef OF_ATOMIC_OPS # import "atomic.h" #endif #ifdef OF_THREADS # import "threading.h" Index: src/OFConstantString.m ================================================================== --- src/OFConstantString.m +++ src/OFConstantString.m @@ -15,11 +15,12 @@ */ #include "config.h" #import "OFConstantString.h" -#import "OFExceptions.h" + +#import "OFNotImplementedException.h" #ifdef OF_APPLE_RUNTIME # import void *_OFConstantStringClassReference; Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -21,11 +21,17 @@ #include #import "OFDataArray.h" #import "OFString.h" #import "OFFile.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFInvalidEncodingException.h" +#import "OFNotImplementedException.h" +#import "OFOutOfMemoryException.h" +#import "OFOutOfRangeException.h" + #import "base64.h" #import "macros.h" /* References for static linking */ void _references_to_categories_of_OFDataArray() Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -23,16 +23,20 @@ #include #import "OFDate.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" +#ifdef OF_THREADS +# import "OFThread.h" +#endif + +#import "OFInitializationFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFOutOfRangeException.h" #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_THREADS) -# import "OFThread.h" - static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R # define GMTIME_RET(field) \ Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -21,11 +21,15 @@ #import "OFDictionary.h" #import "OFEnumerator.h" #import "OFArray.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" +#import "OFInvalidArgumentException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" struct of_dictionary_bucket of_dictionary_deleted_bucket = {}; #define BUCKET struct of_dictionary_bucket Index: src/OFEnumerator.m ================================================================== --- src/OFEnumerator.m +++ src/OFEnumerator.m @@ -15,11 +15,12 @@ */ #include "config.h" #import "OFEnumerator.h" -#import "OFExceptions.h" + +#import "OFNotImplementedException.h" @implementation OFEnumerator - init { if (isa == [OFEnumerator class]) { DELETED src/OFExceptions.h Index: src/OFExceptions.h ================================================================== --- src/OFExceptions.h +++ src/OFExceptions.h @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFAllocFailedException.h" -#import "OFException.h" -#import "OFAcceptFailedException.h" -#import "OFAddressTranslationFailedException.h" -#import "OFAlreadyConnectedException.h" -#import "OFBindFailedException.h" -#import "OFChangeDirectoryFailedException.h" -#import "OFChangeFileModeFailedException.h" -#import "OFChangeFileOwnerFailedException.h" -#import "OFConditionBroadcastFailedException.h" -#import "OFConditionSignalFailedException.h" -#import "OFConditionWaitFailedException.h" -#import "OFConditionWaitingException.h" -#import "OFConnectionFailedException.h" -#import "OFCopyFileFailedException.h" -#import "OFCreateDirectoryFailedException.h" -#import "OFDeleteDirectoryFailedException.h" -#import "OFDeleteFileFailedException.h" -#import "OFEnumerationMutationException.h" -#import "OFHashAlreadyCalculatedException.h" -#import "OFHTTPRequestFailedException.h" -#import "OFInitializationFailedException.h" -#import "OFInvalidArgumentException.h" -#import "OFInvalidEncodingException.h" -#import "OFInvalidFormatException.h" -#import "OFInvalidServerReplyException.h" -#import "OFLinkFailedException.h" -#import "OFListenFailedException.h" -#import "OFMalformedXMLException.h" -#import "OFMemoryNotPartOfObjectException.h" -#import "OFMutexLockedException.h" -#import "OFMutexLockFailedException.h" -#import "OFMutexUnlockFailedException.h" -#import "OFNotConnectedException.h" -#import "OFNotImplementedException.h" -#import "OFOpenFileFailedException.h" -#import "OFOutOfMemoryException.h" -#import "OFOutOfRangeException.h" -#import "OFReadFailedException.h" -#import "OFReadOrWriteFailedException.h" -#import "OFRenameFileFailedException.h" -#import "OFSeekFailedException.h" -#import "OFSetOptionFailedException.h" -#import "OFSymlinkFailedException.h" -#import "OFThreadJoinFailedException.h" -#import "OFThreadStartFailedException.h" -#import "OFThreadStillRunningException.h" -#import "OFTruncatedDataException.h" -#import "OFUnboundNamespaceException.h" -#import "OFUnsupportedProtocolException.h" -#import "OFWriteFailedException.h" Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -38,11 +38,27 @@ # import "OFThread.h" #endif #import "OFDate.h" #import "OFApplication.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFChangeDirectoryFailedException.h" +#import "OFChangeFileModeFailedException.h" +#import "OFChangeFileOwnerFailedException.h" +#import "OFCreateDirectoryFailedException.h" +#import "OFDeleteDirectoryFailedException.h" +#import "OFDeleteFileFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFLinkFailedException.h" +#import "OFNotImplementedException.h" +#import "OFOpenFileFailedException.h" +#import "OFReadFailedException.h" +#import "OFRenameFileFailedException.h" +#import "OFSeekFailedException.h" +#import "OFSymlinkFailedException.h" +#import "OFWriteFailedException.h" + #import "macros.h" #ifdef _WIN32 # import #endif Index: src/OFHTTPRequest.m ================================================================== --- src/OFHTTPRequest.m +++ src/OFHTTPRequest.m @@ -22,11 +22,17 @@ #import "OFString.h" #import "OFURL.h" #import "OFTCPSocket.h" #import "OFDictionary.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFHTTPRequestFailedException.h" +#import "OFInvalidServerReplyException.h" +#import "OFOutOfRangeException.h" +#import "OFTruncatedDataException.h" +#import "OFUnsupportedProtocolException.h" + #import "macros.h" Class of_http_request_tls_socket_class = Nil; @implementation OFHTTPRequest Index: src/OFHash.m ================================================================== --- src/OFHash.m +++ src/OFHash.m @@ -15,11 +15,12 @@ */ #include "config.h" #import "OFHash.h" -#import "OFExceptions.h" + +#import "OFNotImplementedException.h" @implementation OFHash + (size_t)digestSize { @throw [OFNotImplementedException newWithClass: self Index: src/OFList.m ================================================================== --- src/OFList.m +++ src/OFList.m @@ -19,11 +19,13 @@ #include "assert.h" #import "OFList.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" + #import "macros.h" @implementation OFList + list { Index: src/OFMD5Hash.m ================================================================== --- src/OFMD5Hash.m +++ src/OFMD5Hash.m @@ -17,11 +17,13 @@ #include "config.h" #include #import "OFMD5Hash.h" -#import "OFExceptions.h" + +#import "OFHashAlreadyCalculatedException.h" + #import "macros.h" /* The four MD5 core functions - F1 is optimized somewhat */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -19,11 +19,14 @@ #include #import "OFMutableArray.h" #import "OFDataArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" +#import "OFInvalidArgumentException.h" +#import "OFOutOfRangeException.h" @implementation OFMutableArray - copy { OFArray *new = [[OFArray alloc] init]; Index: src/OFMutableDictionary.m ================================================================== --- src/OFMutableDictionary.m +++ src/OFMutableDictionary.m @@ -18,11 +18,15 @@ #include #import "OFMutableDictionary.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" +#import "OFInvalidArgumentException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" #define BUCKET struct of_dictionary_bucket #define DELETED &of_dictionary_deleted_bucket Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -28,11 +28,17 @@ #else # define madvise(addr, len, advise) #endif #import "OFString.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFInvalidEncodingException.h" +#import "OFInvalidFormatException.h" +#import "OFOutOfMemoryException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" #import "of_asprintf.h" #import "unicode.h" Index: src/OFNumber.m ================================================================== --- src/OFNumber.m +++ src/OFNumber.m @@ -18,11 +18,14 @@ #include #import "OFNumber.h" #import "OFString.h" -#import "OFExceptions.h" + +#import "OFInvalidFormatException.h" +#import "OFNotImplementedException.h" + #import "macros.h" #define RETURN_AS(t) \ switch (type) { \ case OF_NUMBER_BOOL: \ @@ -873,12 +876,11 @@ case OF_NUMBER_FLOAT: case OF_NUMBER_DOUBLE: return ([(OFNumber*)obj doubleValue] == [self doubleValue] ? YES : NO); default: - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + return NO; } } - (uint32_t)hash { Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -22,11 +22,20 @@ #include #include #import "OFObject.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFAllocFailedException.h" +#import "OFEnumerationMutationException.h" +#import "OFInitializationFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFMemoryNotPartOfObjectException.h" +#import "OFNotImplementedException.h" +#import "OFOutOfMemoryException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" #if defined(OF_OBJFW_RUNTIME) # import #elif defined(OF_OLD_GNU_RUNTIME) Index: src/OFPlugin.m ================================================================== --- src/OFPlugin.m +++ src/OFPlugin.m @@ -24,11 +24,13 @@ #endif #import "OFPlugin.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInitializationFailedException.h" +#import "OFNotImplementedException.h" #ifdef _WIN32 # define dlopen(file, mode) LoadLibrary(file) # define dlsym(handle, symbol) GetProcAddress(handle, symbol) # define dlclose(handle) FreeLibrary(handle) Index: src/OFSHA1Hash.m ================================================================== --- src/OFSHA1Hash.m +++ src/OFSHA1Hash.m @@ -17,11 +17,13 @@ #include "config.h" #include #import "OFSHA1Hash.h" -#import "OFExceptions.h" + +#import "OFHashAlreadyCalculatedException.h" + #import "macros.h" /* blk0() and blk() perform the initial expand. */ #ifndef OF_BIG_ENDIAN #define blk0(i) \ Index: src/OFSeekableStream.m ================================================================== --- src/OFSeekableStream.m +++ src/OFSeekableStream.m @@ -13,11 +13,12 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFSeekableStream.h" -#import "OFExceptions.h" + +#import "OFNotImplementedException.h" @implementation OFSeekableStream - (void)_seekToOffset: (off_t)offset { @throw [OFNotImplementedException newWithClass: isa Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -30,13 +30,17 @@ #endif #import "OFStream.h" #import "OFString.h" #import "OFDataArray.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFInvalidFormatException.h" +#import "OFNotImplementedException.h" +#import "OFSetOptionFailedException.h" + #import "macros.h" - #import "of_asprintf.h" @implementation OFStream #ifndef _WIN32 + (void)initialize Index: src/OFStreamObserver.m ================================================================== --- src/OFStreamObserver.m +++ src/OFStreamObserver.m @@ -29,11 +29,12 @@ #import "OFArray.h" #import "OFDictionary.h" #import "OFStream.h" #import "OFNumber.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFOutOfRangeException.h" @implementation OFStreamObserver + observer { return [[[self alloc] init] autorelease]; Index: src/OFStreamSocket.m ================================================================== --- src/OFStreamSocket.m +++ src/OFStreamSocket.m @@ -24,11 +24,14 @@ # include # include #endif #import "OFStreamSocket.h" -#import "OFExceptions.h" + +#import "OFNotConnectedException.h" +#import "OFReadFailedException.h" +#import "OFWriteFailedException.h" #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif Index: src/OFString+URLEncoding.m ================================================================== --- src/OFString+URLEncoding.m +++ src/OFString+URLEncoding.m @@ -19,11 +19,13 @@ #include #include #include #import "OFString+URLEncoding.h" -#import "OFExceptions.h" + +#import "OFInvalidEncodingException.h" +#import "OFOutOfMemoryException.h" /* Reference for static linking */ int _OFString_URLEncoding_reference; @implementation OFString (URLEncoding) Index: src/OFString+XMLEscaping.m ================================================================== --- src/OFString+XMLEscaping.m +++ src/OFString+XMLEscaping.m @@ -19,11 +19,12 @@ #include #include #include #import "OFString.h" -#import "OFExceptions.h" + +#import "OFOutOfMemoryException.h" int _OFString_XMLEscaping_reference; @implementation OFString (XMLEscaping) - (OFString*)stringByXMLEscaping Index: src/OFString+XMLUnescaping.m ================================================================== --- src/OFString+XMLUnescaping.m +++ src/OFString+XMLUnescaping.m @@ -18,11 +18,13 @@ #include #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInvalidEncodingException.h" + #import "macros.h" int _OFString_XMLUnescaping_reference; static OF_INLINE OFString* Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -35,13 +35,20 @@ #import "OFArray.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPRequest.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFHTTPRequestFailedException.h" +#import "OFInitializationFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFInvalidEncodingException.h" +#import "OFInvalidFormatException.h" +#import "OFOutOfMemoryException.h" +#import "OFOutOfRangeException.h" + #import "macros.h" - #import "of_asprintf.h" #import "unicode.h" extern const uint16_t of_iso_8859_15[256]; extern const uint16_t of_windows_1252[256]; Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -29,11 +29,21 @@ # include #endif #import "OFTCPSocket.h" #import "OFString.h" -#import "OFExceptions.h" + +#import "OFAcceptFailedException.h" +#import "OFAlreadyConnectedException.h" +#import "OFAddressTranslationFailedException.h" +#import "OFBindFailedException.h" +#import "OFConnectionFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFListenFailedException.h" +#import "OFNotConnectedException.h" +#import "OFSetOptionFailedException.h" + #import "macros.h" #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -25,11 +25,25 @@ #import "OFThread.h" #import "OFList.h" #import "OFDate.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFConditionBroadcastFailedException.h" +#import "OFConditionSignalFailedException.h" +#import "OFConditionWaitFailedException.h" +#import "OFConditionWaitingException.h" +#import "OFInitializationFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFMutexLockedException.h" +#import "OFMutexLockFailedException.h" +#import "OFMutexUnlockFailedException.h" +#import "OFNotImplementedException.h" +#import "OFOutOfRangeException.h" +#import "OFThreadJoinFailedException.h" +#import "OFThreadStartFailedException.h" +#import "OFThreadStillRunningException.h" #import "threading.h" static OFList *tlskeys; static of_tlskey_t thread_self; Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -22,11 +22,15 @@ #import "OFURL.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFInvalidFormatException.h" +#import "OFOutOfMemoryException.h" + #import "macros.h" #define ADD_STR_HASH(str) \ h = [str hash]; \ OF_HASH_ADD(hash, h >> 24); \ Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -23,11 +23,14 @@ #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFXMLAttribute.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFNotImplementedException.h" +#import "OFUnboundNamespaceException.h" @implementation OFXMLElement + elementWithName: (OFString*)name_ { return [[[self alloc] initWithName: name_] autorelease]; Index: src/OFXMLElementBuilder.m ================================================================== --- src/OFXMLElementBuilder.m +++ src/OFXMLElementBuilder.m @@ -21,11 +21,12 @@ #import "OFXMLElementBuilder.h" #import "OFXMLElement.h" #import "OFXMLParser.h" #import "OFMutableArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFMalformedXMLException.h" @implementation OFXMLElementBuilder + elementBuilder { return [[[self alloc] init] autorelease]; Index: src/OFXMLParser.m ================================================================== --- src/OFXMLParser.m +++ src/OFXMLParser.m @@ -27,11 +27,15 @@ #import "OFDictionary.h" #import "OFXMLAttribute.h" #import "OFStream.h" #import "OFFile.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInitializationFailedException.h" +#import "OFMalformedXMLException.h" +#import "OFUnboundNamespaceException.h" + #import "macros.h" typedef void (*state_function)(id, SEL, const char*, size_t*, size_t*); static SEL selectors[OF_XMLPARSER_NUM_STATES]; static state_function lookup_table[OF_XMLPARSER_NUM_STATES]; Index: src/ObjFW.h ================================================================== --- src/ObjFW.h +++ src/ObjFW.h @@ -16,11 +16,10 @@ #import "objfw-defs.h" #import "OFObject.h" #import "OFBlock.h" -#import "OFExceptions.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFDataArray.h" @@ -51,10 +50,62 @@ #import "OFXMLElement.h" #import "OFXMLParser.h" #import "OFXMLElementBuilder.h" #import "OFApplication.h" + +#import "OFAllocFailedException.h" +#import "OFException.h" +#import "OFAcceptFailedException.h" +#import "OFAddressTranslationFailedException.h" +#import "OFAlreadyConnectedException.h" +#import "OFBindFailedException.h" +#import "OFChangeDirectoryFailedException.h" +#import "OFChangeFileModeFailedException.h" +#import "OFChangeFileOwnerFailedException.h" +#import "OFConditionBroadcastFailedException.h" +#import "OFConditionSignalFailedException.h" +#import "OFConditionWaitFailedException.h" +#import "OFConditionWaitingException.h" +#import "OFConnectionFailedException.h" +#import "OFCopyFileFailedException.h" +#import "OFCreateDirectoryFailedException.h" +#import "OFDeleteDirectoryFailedException.h" +#import "OFDeleteFileFailedException.h" +#import "OFEnumerationMutationException.h" +#import "OFHashAlreadyCalculatedException.h" +#import "OFHTTPRequestFailedException.h" +#import "OFInitializationFailedException.h" +#import "OFInvalidArgumentException.h" +#import "OFInvalidEncodingException.h" +#import "OFInvalidFormatException.h" +#import "OFInvalidServerReplyException.h" +#import "OFLinkFailedException.h" +#import "OFListenFailedException.h" +#import "OFMalformedXMLException.h" +#import "OFMemoryNotPartOfObjectException.h" +#import "OFMutexLockedException.h" +#import "OFMutexLockFailedException.h" +#import "OFMutexUnlockFailedException.h" +#import "OFNotConnectedException.h" +#import "OFNotImplementedException.h" +#import "OFOpenFileFailedException.h" +#import "OFOutOfMemoryException.h" +#import "OFOutOfRangeException.h" +#import "OFReadFailedException.h" +#import "OFReadOrWriteFailedException.h" +#import "OFRenameFileFailedException.h" +#import "OFSeekFailedException.h" +#import "OFSetOptionFailedException.h" +#import "OFSymlinkFailedException.h" +#import "OFThreadJoinFailedException.h" +#import "OFThreadStartFailedException.h" +#import "OFThreadStillRunningException.h" +#import "OFTruncatedDataException.h" +#import "OFUnboundNamespaceException.h" +#import "OFUnsupportedProtocolException.h" +#import "OFWriteFailedException.h" #import "macros.h" #ifdef OF_PLUGINS # import "OFPlugin.h" Index: src/exceptions/OFChangeFileModeFailedException.m ================================================================== --- src/exceptions/OFChangeFileModeFailedException.m +++ src/exceptions/OFChangeFileModeFailedException.m @@ -14,12 +14,14 @@ * file. */ #include "config.h" -#import "OFExceptions.h" +#import "OFChangeFileModeFailedException.h" #import "OFString.h" + +#import "OFNotImplementedException.h" #import "common.h" @implementation OFChangeFileModeFailedException + newWithClass: (Class)class_ Index: tests/OFArrayTests.m ================================================================== --- tests/OFArrayTests.m +++ tests/OFArrayTests.m @@ -17,11 +17,13 @@ #include "config.h" #import "OFArray.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" +#import "OFOutOfRangeException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFArray"; static OFString *c_ary[] = { Index: tests/OFBlockTests.m ================================================================== --- tests/OFBlockTests.m +++ tests/OFBlockTests.m @@ -17,11 +17,10 @@ #include "config.h" #import "OFBlock.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" #if defined(OF_OBJFW_RUNTIME) # include #elif defined(OF_OLD_GNU_RUNTIME) # include Index: tests/OFDataArrayTests.m ================================================================== --- tests/OFDataArrayTests.m +++ tests/OFDataArrayTests.m @@ -19,11 +19,12 @@ #include #import "OFDataArray.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFOutOfRangeException.h" #import "TestsAppDelegate.h" static OFString *module; const char *str = "Hello!"; Index: tests/OFDictionaryTests.m ================================================================== --- tests/OFDictionaryTests.m +++ tests/OFDictionaryTests.m @@ -18,11 +18,12 @@ #import "OFDictionary.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFDictionary"; static OFString *keys[] = { Index: tests/OFListTests.m ================================================================== --- tests/OFListTests.m +++ tests/OFListTests.m @@ -17,11 +17,12 @@ #include "config.h" #import "OFList.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFEnumerationMutationException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFList"; static OFString *strings[] = { Index: tests/OFMD5HashTests.m ================================================================== --- tests/OFMD5HashTests.m +++ tests/OFMD5HashTests.m @@ -20,11 +20,12 @@ #import "OFMD5Hash.h" #import "OFString.h" #import "OFFile.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFHashAlreadyCalculatedException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFMD5Hash"; Index: tests/OFObjectTests.m ================================================================== --- tests/OFObjectTests.m +++ tests/OFObjectTests.m @@ -16,11 +16,13 @@ #include "config.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFMemoryNotPartOfObjectException.h" +#import "OFOutOfMemoryException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFObject"; Index: tests/OFSHA1HashTests.m ================================================================== --- tests/OFSHA1HashTests.m +++ tests/OFSHA1HashTests.m @@ -20,11 +20,12 @@ #import "OFSHA1Hash.h" #import "OFString.h" #import "OFFile.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFHashAlreadyCalculatedException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFHash"; Index: tests/OFStringTests.m ================================================================== --- tests/OFStringTests.m +++ tests/OFStringTests.m @@ -21,11 +21,15 @@ #import "OFString.h" #import "OFArray.h" #import "OFURL.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInvalidArgumentException.h" +#import "OFInvalidEncodingException.h" +#import "OFInvalidFormatException.h" +#import "OFOutOfRangeException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFString"; static OFString* whitespace[] = { Index: tests/OFTCPSocketTests.m ================================================================== --- tests/OFTCPSocketTests.m +++ tests/OFTCPSocketTests.m @@ -21,11 +21,11 @@ #include #import "OFTCPSocket.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + #import "macros.h" #import "TestsAppDelegate.h" static OFString *module = @"OFTCPSocket"; Index: tests/OFThreadTests.m ================================================================== --- tests/OFThreadTests.m +++ tests/OFThreadTests.m @@ -17,11 +17,10 @@ #include "config.h" #import "OFThread.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" #import "TestsAppDelegate.h" static OFString *module = @"OFThread"; Index: tests/OFURLTests.m ================================================================== --- tests/OFURLTests.m +++ tests/OFURLTests.m @@ -17,11 +17,12 @@ #include "config.h" #import "OFURL.h" #import "OFString.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFInvalidFormatException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFURL"; static OFString *url_str = @"http://u:p@h:1234/f;p?q#f"; Index: tests/OFXMLElementTests.m ================================================================== --- tests/OFXMLElementTests.m +++ tests/OFXMLElementTests.m @@ -18,11 +18,10 @@ #import "OFXMLElement.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" #import "TestsAppDelegate.h" static OFString *module = @"OFXMLElement"; Index: tests/OFXMLParserTests.m ================================================================== --- tests/OFXMLParserTests.m +++ tests/OFXMLParserTests.m @@ -21,11 +21,12 @@ #import "OFXMLParser.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" -#import "OFExceptions.h" + +#import "OFMalformedXMLException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFXMLParser"; static OFXMLParser *parser;