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
65
|
#import "OFAddressTranslationFailedException.h"
#import "OFString.h"
#import "common.h"
@implementation OFAddressTranslationFailedException
+ newWithClass: (Class)class_
host: (OFString*)host
{
return [[self alloc] initWithClass: class_
host: host];
}
- initWithClass: (Class)class_
{
self = [super initWithClass: class_];
errNo = GET_AT_ERRNO;
return self;
}
- initWithClass: (Class)class_
host: (OFString*)host_
{
self = [super initWithClass: class_];
@try {
host = [host_ copy];
errNo = GET_AT_ERRNO;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[host release];
[super dealloc];
}
- (OFString*)description
{
|
>
>
>
>
|
|
>
|
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
65
66
67
68
69
70
|
#import "OFAddressTranslationFailedException.h"
#import "OFString.h"
#import "common.h"
@implementation OFAddressTranslationFailedException
+ newWithClass: (Class)class_
socket: (OFTCPSocket*)socket
host: (OFString*)host
{
return [[self alloc] initWithClass: class_
socket: socket
host: host];
}
- initWithClass: (Class)class_
{
self = [super initWithClass: class_];
errNo = GET_AT_ERRNO;
return self;
}
- initWithClass: (Class)class_
socket: (OFTCPSocket*)socket_
host: (OFString*)host_
{
self = [super initWithClass: class_];
@try {
socket = [socket_ retain];
host = [host_ copy];
errNo = GET_AT_ERRNO;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[socket release];
[host release];
[super dealloc];
}
- (OFString*)description
{
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
description = [[OFString alloc] initWithFormat:
@"An address translation failed in class %@! " ERRFMT,
inClass, AT_ERRPARAM];
return description;
}
- (int)errNo
{
return errNo;
}
- (OFString*)host
{
return host;
}
@end
|
|
|
>
>
>
>
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
description = [[OFString alloc] initWithFormat:
@"An address translation failed in class %@! " ERRFMT,
inClass, AT_ERRPARAM];
return description;
}
- (OFTCPSocket*)socket
{
return socket;
}
- (OFString*)host
{
return host;
}
- (int)errNo
{
return errNo;
}
@end
|