ObjFW  Diff

Differences From Artifact [e44ccf7144]:

To Artifact [eea8d45e3d]:


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

@implementation OFUnboundPrefixException
@synthesize prefix = _prefix, parser = _parser;

+ (instancetype)exceptionWithPrefix: (OFString*)prefix
			     parser: (OFXMLParser*)parser
{
	return [[[self alloc] initWithPrefix: prefix
				      parser: parser] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithPrefix: (OFString*)prefix
	  parser: (OFXMLParser*)parser
{
	self = [super init];

	@try {
		_prefix = [prefix copy];
		_parser = [parser retain];
	} @catch (id e) {







|
|










|
|







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

@implementation OFUnboundPrefixException
@synthesize prefix = _prefix, parser = _parser;

+ (instancetype)exceptionWithPrefix: (OFString *)prefix
			     parser: (OFXMLParser *)parser
{
	return [[[self alloc] initWithPrefix: prefix
				      parser: parser] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithPrefix: (OFString *)prefix
	  parser: (OFXMLParser *)parser
{
	self = [super init];

	@try {
		_prefix = [prefix copy];
		_parser = [parser retain];
	} @catch (id e) {
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
	[_prefix release];
	[_parser release];

	[super dealloc];
}

- (OFString*)description
{
	return [OFString stringWithFormat:
	    @"An XML parser of type %@ encountered the unbound prefix %@ in "
	    @"line %zu!", [_parser class], _prefix, [_parser lineNumber]];
}
@end







|






55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
	[_prefix release];
	[_parser release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"An XML parser of type %@ encountered the unbound prefix %@ in "
	    @"line %zu!", [_parser class], _prefix, [_parser lineNumber]];
}
@end