Differences From Artifact [303b5d3929]:
- File src/exceptions/OFUnboundNamespaceException.m — part of check-in [e1eea29286] at 2011-03-24 16:09:40 on branch trunk — Split OFExceptions.{h,m} into one file per exception. (user: js, size: 2087) [annotate] [blame] [check-ins using]
To Artifact [b54969fda6]:
- File
src/exceptions/OFUnboundNamespaceException.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: 2139) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFUnboundNamespaceException.h" #import "OFString.h" #import "OFNotImplementedException.h" @implementation OFUnboundNamespaceException | | | | | | | | | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #import "OFUnboundNamespaceException.h" #import "OFString.h" #import "OFNotImplementedException.h" @implementation OFUnboundNamespaceException + exceptionWithClass: (Class)class_ namespace: (OFString*)ns { return [[[self alloc] initWithClass: class_ namespace: ns] autorelease]; } + exceptionWithClass: (Class)class_ prefix: (OFString*)prefix { return [[[self alloc] initWithClass: class_ prefix: prefix] autorelease]; } - initWithClass: (Class)class_ { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - initWithClass: (Class)class_ namespace: (OFString*)ns_ { self = [super initWithClass: class_]; |
︙ | ︙ |