Skip to content

Commit

Permalink
#171: Missing upgrades to the new ResultCode APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Mar 2, 2017
1 parent a721748 commit 023fa8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GRDB/Core/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ extension Database {
sqlite3_key(sqliteConnection, bytes, Int32(data.count))
}
guard code == SQLITE_OK else {
throw DatabaseError(resultCode: code, message: String(cString: sqlite3_errmsg(sqliteConnection)))
throw DatabaseError(resultCode: ResultCode(rawValue: code), message: String(cString: sqlite3_errmsg(sqliteConnection)))
}
}

Expand All @@ -979,7 +979,7 @@ extension Database {
sqlite3_rekey(sqliteConnection, bytes, Int32(data.count))
}
guard code == SQLITE_OK else {
throw DatabaseError(resultCode: code, message: String(cString: sqlite3_errmsg(sqliteConnection)))
throw DatabaseError(resultCode: ResultCode(rawValue: code), message: String(cString: sqlite3_errmsg(sqliteConnection)))
}
}
}
Expand Down

0 comments on commit 023fa8a

Please sign in to comment.