ObjFW  Diff

Differences From Artifact [1eb0d20455]:

To Artifact [00e16809f3]:


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
#import "OFString.h"
#import "OFSeekableStream.h"

@implementation OFSeekFailedException
@synthesize stream = _stream, offset = _offset, whence = _whence;
@synthesize errNo = _errNo;

+ (instancetype)exceptionWithStream: (OFSeekableStream*)stream
			     offset: (of_offset_t)offset
			     whence: (int)whence
			      errNo: (int)errNo
{
	return [[[self alloc] initWithStream: stream
				      offset: offset
				      whence: whence
				       errNo: errNo] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithStream: (OFSeekableStream*)stream
	  offset: (of_offset_t)offset
	  whence: (int)whence
	   errNo: (int)errNo
{
	self = [super init];

	_stream = [stream retain];







|















|







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
#import "OFString.h"
#import "OFSeekableStream.h"

@implementation OFSeekFailedException
@synthesize stream = _stream, offset = _offset, whence = _whence;
@synthesize errNo = _errNo;

+ (instancetype)exceptionWithStream: (OFSeekableStream *)stream
			     offset: (of_offset_t)offset
			     whence: (int)whence
			      errNo: (int)errNo
{
	return [[[self alloc] initWithStream: stream
				      offset: offset
				      whence: whence
				       errNo: errNo] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithStream: (OFSeekableStream *)stream
	  offset: (of_offset_t)offset
	  whence: (int)whence
	   errNo: (int)errNo
{
	self = [super init];

	_stream = [stream retain];
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- (void)dealloc
{
	[_stream release];

	[super dealloc];
}

- (OFString*)description
{
	return [OFString stringWithFormat:
	    @"Seeking failed in stream of type %@: %@",
	    [_stream class], of_strerror(_errNo)];
}
@end







|






58
59
60
61
62
63
64
65
66
67
68
69
70
71
- (void)dealloc
{
	[_stream release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"Seeking failed in stream of type %@: %@",
	    [_stream class], of_strerror(_errNo)];
}
@end