Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Code cleanup

  • Loading branch information...
commit 46614e25a9f50d3e06943c48d0894ea86f0e4444 1 parent 78784e3
August "Gus" Mueller authored
Showing with 7 additions and 15 deletions.
  1. +7 −15 src/FMDatabase.m
22 src/FMDatabase.m
View
@@ -289,19 +289,14 @@ - (int)lastErrorCode {
}
--(NSError*)errorWithMessage:( NSString* )message_
-{
- NSDictionary* errorMessage_ = [ NSDictionary dictionaryWithObject: message_
- forKey: NSLocalizedDescriptionKey];
-
- return [NSError errorWithDomain:@"FMDatabase"
- code:sqlite3_errcode(_db)
- userInfo:errorMessage_];
+- (NSError*)errorWithMessage:(NSString*)message {
+ NSDictionary* errorMessage = [NSDictionary dictionaryWithObject:message forKey:NSLocalizedDescriptionKey];
+
+ return [NSError errorWithDomain:@"FMDatabase" code:sqlite3_errcode(_db) userInfo:errorMessage];
}
--(NSError*)lastError
-{
- return [ self errorWithMessage: [ self lastErrorMessage ] ];
+- (NSError*)lastError {
+ return [self errorWithMessage:[self lastErrorMessage]];
}
- (sqlite_int64)lastInsertRowId {
@@ -737,10 +732,7 @@ - (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArra
sqlite3_finalize(pStmt);
if (outErr) {
-
-
-
- *outErr = [ self errorWithMessage: [NSString stringWithUTF8String:sqlite3_errmsg(_db)] ];
+ *outErr = [self errorWithMessage:[NSString stringWithUTF8String:sqlite3_errmsg(_db)]];
}
_isExecutingStatement = NO;
Please sign in to comment.
Something went wrong with that request. Please try again.