14
15
16
17
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
|
14
15
16
17
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
|
+
-
+
-
+
-
|
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import <Foundation/NSDictionary.h>
#import "OFNSDictionary.h"
#import "OFNSEnumerator.h"
#import "NSBridging.h"
#import "OFBridging.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
@implementation OFNSDictionary
- (instancetype)initWithNSDictionary: (NSDictionary *)dictionary
{
self = [super init];
@try {
if (dictionary == nil)
@throw [OFInitializationFailedException
@throw [OFInvalidArgumentException exception];
exceptionWithClass: self.class];
_dictionary = [dictionary retain];
} @catch (id e) {
[self release];
@throw e;
}
|