Index: src/OFExceptions.h ================================================================== --- src/OFExceptions.h +++ src/OFExceptions.h @@ -9,12 +9,10 @@ * the packaging of this file. */ #import "OFObject.h" -/* FIXME: Exceptions should include which type of error occoured (fopen etc.) */ - /** * The OFException class is the base class for all exceptions in ObjFW. */ @interface OFException: OFObject { Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -77,10 +77,11 @@ } - free { fclose(fp); + return [super free]; } - (BOOL)atEndOfFile { @@ -162,16 +163,6 @@ { return [self writeNItems: strlen(str) ofSize: 1 fromBuffer: (const uint8_t*)str]; } - -- close -{ - if (fclose(fp)) { - /* FIXME: Throw exception */ - return nil; - } - - return self; -} @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -48,11 +48,6 @@ * * \param str The C string from which the data is written to the stream * \return The number of bytes written */ - (size_t)writeCString: (const char*)str; - -/** - * Closes the stream. - */ -- close; @end Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -74,6 +74,11 @@ /** * Accept an incoming connection. */ - (OFTCPSocket*)accept; + +/** + * Closes the socket. + */ +- close; @end