@@ -120,28 +120,27 @@ @implementation OFRunLoop_ReadQueueItem - (bool)handleForObject: (id)object { size_t length; - OFException *exception = nil; + id exception = nil; @try { length = [object readIntoBuffer: _buffer length: _length]; - } @catch (OFException *e) { + } @catch (id e) { length = 0; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) return _block(object, _buffer, length, exception); else { # endif - bool (*func)(id, SEL, OFStream *, void *, size_t, id, - OFException *) = (bool (*)(id, SEL, OFStream *, void *, - size_t, id, OFException *)) + bool (*func)(id, SEL, OFStream *, void *, size_t, id, id) = + (bool (*)(id, SEL, OFStream *, void *, size_t, id, id)) [_target methodForSelector: _selector]; return func(_target, _selector, object, _buffer, length, _context, exception); # ifdef OF_HAVE_BLOCKS @@ -161,16 +160,16 @@ @implementation OFRunLoop_ExactReadQueueItem - (bool)handleForObject: (id)object { size_t length; - OFException *exception = nil; + id exception = nil; @try { length = [object readIntoBuffer: (char *)_buffer + _readLength length: _exactLength - _readLength]; - } @catch (OFException *e) { + } @catch (id e) { length = 0; exception = e; } _readLength += length; @@ -186,13 +185,12 @@ _readLength = 0; return true; } else { # endif - bool (*func)(id, SEL, OFStream *, void *, size_t, id, - OFException *) = (bool (*)(id, SEL, OFStream *, void *, - size_t, id, OFException *)) + bool (*func)(id, SEL, OFStream *, void *, size_t, id, id) = + (bool (*)(id, SEL, OFStream *, void *, size_t, id, id)) [_target methodForSelector: _selector]; if (!func(_target, _selector, object, _buffer, _readLength, _context, exception)) return false; @@ -216,15 +214,15 @@ @implementation OFRunLoop_ReadLineQueueItem - (bool)handleForObject: (id)object { OFString *line; - OFException *exception = nil; + id exception = nil; @try { line = [object tryReadLineWithEncoding: _encoding]; - } @catch (OFException *e) { + } @catch (id e) { line = nil; exception = e; } if (line == nil && ![object isAtEndOfStream] && exception == nil) @@ -233,13 +231,13 @@ # ifdef OF_HAVE_BLOCKS if (_block != NULL) return _block(object, line, exception); else { # endif - bool (*func)(id, SEL, OFStream *, OFString *, id, - OFException *) = (bool (*)(id, SEL, OFStream *, OFString *, - id, OFException *))[_target methodForSelector: _selector]; + bool (*func)(id, SEL, OFStream *, OFString *, id, id) = + (bool (*)(id, SEL, OFStream *, OFString *, id, id)) + [_target methodForSelector: _selector]; return func(_target, _selector, object, line, _context, exception); # ifdef OF_HAVE_BLOCKS } @@ -258,27 +256,26 @@ @implementation OFRunLoop_AcceptQueueItem - (bool)handleForObject: (id)object { OFTCPSocket *newSocket; - OFException *exception = nil; + id exception = nil; @try { newSocket = [object accept]; - } @catch (OFException *e) { + } @catch (id e) { newSocket = nil; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) return _block(object, newSocket, exception); else { # endif - bool (*func)(id, SEL, OFTCPSocket *, OFTCPSocket *, id, - OFException *) = (bool (*)(id, SEL, OFTCPSocket *, - OFTCPSocket *, id, OFException *)) + bool (*func)(id, SEL, OFTCPSocket *, OFTCPSocket *, id, id) = + (bool (*)(id, SEL, OFTCPSocket *, OFTCPSocket *, id, id)) [_target methodForSelector: _selector]; return func(_target, _selector, object, newSocket, _context, exception); # ifdef OF_HAVE_BLOCKS @@ -299,17 +296,17 @@ @implementation OFRunLoop_UDPReceiveQueueItem - (bool)handleForObject: (id)object { size_t length; of_udp_socket_address_t address; - OFException *exception = nil; + id exception = nil; @try { length = [object receiveIntoBuffer: _buffer length: _length sender: &address]; - } @catch (OFException *e) { + } @catch (id e) { length = 0; exception = e; } # ifdef OF_HAVE_BLOCKS @@ -316,13 +313,13 @@ if (_block != NULL) return _block(object, _buffer, length, address, exception); else { # endif bool (*func)(id, SEL, OFUDPSocket *, void *, size_t, - of_udp_socket_address_t address, id, OFException *) = + of_udp_socket_address_t address, id, id) = (bool (*)(id, SEL, OFUDPSocket *, void *, size_t, - of_udp_socket_address_t, id, OFException *)) + of_udp_socket_address_t, id, id)) [_target methodForSelector: _selector]; return func(_target, _selector, object, _buffer, length, address, _context, exception); # ifdef OF_HAVE_BLOCKS