Differences From Artifact [914b1a9829]:
- File src/OFObject+Serialization.m — part of check-in [798d9e6320] at 2011-09-09 13:35:16 on branch trunk — [pool release] can never throw by convention now. (user: js, size: 1616) [annotate] [blame] [check-ins using]
To Artifact [f21298cd9d]:
- File
src/OFObject+Serialization.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 1628) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 | OFAutoreleasePool *pool; OFXMLElement *element; OFXMLElement *root; OFString *ret; if (![self conformsToProtocol: @protocol(OFSerialization)]) @throw [OFNotImplementedException | | | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | OFAutoreleasePool *pool; OFXMLElement *element; OFXMLElement *root; OFString *ret; if (![self conformsToProtocol: @protocol(OFSerialization)]) @throw [OFNotImplementedException exceptionWithClass: isa selector: @selector(stringBySerializing)]; pool = [[OFAutoreleasePool alloc] init]; element = [(id)self XMLElementBySerializing]; root = [OFXMLElement elementWithName: @"serialization" namespace: OF_SERIALIZATION_NS]; [root addAttributeWithName: @"version" |
︙ | ︙ |