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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
*/
#include "config.h"
#import "OFOpenWindowsRegistryKeyFailedException.h"
@implementation OFOpenWindowsRegistryKeyFailedException
@synthesize registryKey = _registryKey, path = _path, options = _options;
@synthesize securityAndAccessRights = _securityAndAccessRights;
@synthesize status = _status;
+ (instancetype)
exceptionWithRegistryKey: (OFWindowsRegistryKey *)registryKey
path: (OFString *)path
options: (DWORD)options
securityAndAccessRights: (REGSAM)securityAndAccessRights
status: (LSTATUS)status
{
return [[[self alloc] initWithRegistryKey: registryKey
path: path
options: options
securityAndAccessRights: securityAndAccessRights
status: status] autorelease];
}
+ (instancetype)exception
{
OF_UNRECOGNIZED_SELECTOR
}
- (instancetype)
initWithRegistryKey: (OFWindowsRegistryKey *)registryKey
path: (OFString *)path
options: (DWORD)options
securityAndAccessRights: (REGSAM)securityAndAccessRights
status: (LSTATUS)status
{
self = [super init];
@try {
_registryKey = [registryKey retain];
_path = [path copy];
_options = options;
_securityAndAccessRights = securityAndAccessRights;
_status = status;
} @catch (id e) {
[self release];
@throw e;
}
return self;
|
|
<
|
<
|
|
>
|
<
|
>
<
<
|
|
>
|
<
|
>
<
|
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
*/
#include "config.h"
#import "OFOpenWindowsRegistryKeyFailedException.h"
@implementation OFOpenWindowsRegistryKeyFailedException
@synthesize registryKey = _registryKey, path = _path;
@synthesize accessRights = _accessRights, options = _options, status = _status;
+ (instancetype)exceptionWithRegistryKey: (OFWindowsRegistryKey *)registryKey
path: (OFString *)path
accessRights: (REGSAM)accessRights
options: (DWORD)options
status: (LSTATUS)status
{
return [[[self alloc] initWithRegistryKey: registryKey
path: path
accessRights: accessRights
options: options
status: status] autorelease];
}
+ (instancetype)exception
{
OF_UNRECOGNIZED_SELECTOR
}
- (instancetype)initWithRegistryKey: (OFWindowsRegistryKey *)registryKey
path: (OFString *)path
accessRights: (REGSAM)accessRights
options: (DWORD)options
status: (LSTATUS)status
{
self = [super init];
@try {
_registryKey = [registryKey retain];
_path = [path copy];
_accessRights = accessRights;
_options = options;
_status = status;
} @catch (id e) {
[self release];
@throw e;
}
return self;
|