Modernize coding style
FossilOrigin-Name: 491b090606ca0dcbd65e6abcf2020f8af9342b8c6bd90dc1596bed3f72e6009d
This commit is contained in:
parent
dd11eb6c25
commit
6120fa8fea
10 changed files with 44 additions and 32 deletions
|
@ -32,10 +32,14 @@ OF_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@property (readonly, nonatomic) OFString *command;
|
||||
|
||||
+ (instancetype)exceptionWithConnection: (PGConnection *)connection
|
||||
OF_UNAVAILABLE;
|
||||
+ (instancetype)exceptionWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command;
|
||||
- initWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command;
|
||||
- (instancetype)initWithConnection: (PGConnection *)connection OF_UNAVAILABLE;
|
||||
- (instancetype)initWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command
|
||||
OF_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
OF_ASSUME_NONNULL_END
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
@implementation PGCommandFailedException
|
||||
@synthesize command = _command;
|
||||
|
||||
+ (instancetype)exceptionWithConnection: (PGConnection *)connection
|
||||
{
|
||||
OF_UNRECOGNIZED_SELECTOR
|
||||
}
|
||||
|
||||
+ (instancetype)exceptionWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command
|
||||
{
|
||||
|
@ -33,8 +38,13 @@
|
|||
command: command] autorelease];
|
||||
}
|
||||
|
||||
- initWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command
|
||||
- (instancetype)initWithConnection: (PGConnection *)connection
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- (instancetype)initWithConnection: (PGConnection *)connection
|
||||
command: (OFString *)command
|
||||
{
|
||||
self = [super initWithConnection: connection];
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ OF_ASSUME_NONNULL_BEGIN
|
|||
@property (readonly, nonatomic) PGConnection *connection;
|
||||
|
||||
+ (instancetype)exceptionWithConnection: (PGConnection *)connection;
|
||||
- initWithConnection: (PGConnection *)connection;
|
||||
- (instancetype)initWithConnection: (PGConnection *)connection
|
||||
OF_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
OF_ASSUME_NONNULL_END
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
@try {
|
||||
_connection = [connection retain];
|
||||
_error = [[OFString alloc]
|
||||
initWithCString: PQerrorMessage([_connection PG_connection])
|
||||
initWithCString: PQerrorMessage([_connection pg_connection])
|
||||
encoding: [OFLocale encoding]];
|
||||
} @catch (id e) {
|
||||
[self release];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue