ObjPgSQL  Diff

Differences From Artifact [0be804aea6]:

To Artifact [f39a379181]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import "PGException.h"

@implementation PGException
@synthesize connection = _connection;

+ (instancetype)exceptionWithConnection: (PGConnection*)connection
{
	return [[[self alloc] initWithConnection: connection] autorelease];
}

- initWithConnection: (PGConnection*)connection
{
	self = [super init];

	@try {
		_connection = [connection retain];
		_error = [[OFString alloc]
		    initWithCString: PQerrorMessage([_connection PG_connection])





|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import "PGException.h"

@implementation PGException
@synthesize connection = _connection;

+ (instancetype)exceptionWithConnection: (PGConnection *)connection
{
	return [[[self alloc] initWithConnection: connection] autorelease];
}

- initWithConnection: (PGConnection *)connection
{
	self = [super init];

	@try {
		_connection = [connection retain];
		_error = [[OFString alloc]
		    initWithCString: PQerrorMessage([_connection PG_connection])
29
30
31
32
33
34
35
36
37
38
39
40
41
{
	[_connection release];
	[_error release];

	[super dealloc];
}

- (OFString*)description
{
	return [OFString stringWithFormat: @"A PostgreSQL operation failed: %@",
					   _error];
}
@end







|





29
30
31
32
33
34
35
36
37
38
39
40
41
{
	[_connection release];
	[_error release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"A PostgreSQL operation failed: %@",
					   _error];
}
@end