@@ -36,18 +36,16 @@ flags: (int)flags { self = [super init]; @try { - int errorCode = sqlite3_open_v2(path.UTF8String, &_database, - flags, NULL); - - if (errorCode != SQLITE_OK) - @throw [SL3OpenFailedException - exceptionWithPath: path - flags: flags - errorCode: errorCode]; + int code = sqlite3_open_v2(path.UTF8String, &_db, flags, NULL); + + if (code != SQLITE_OK) + @throw [SL3OpenFailedException exceptionWithPath: path + flags: flags + errorCode: code]; } @catch (id e) { [self release]; @throw e; } @@ -54,10 +52,10 @@ return self; } - (void)dealloc { - sqlite3_close(_database); + sqlite3_close(_db); [super dealloc]; } @end