Skip to content

Commit

Permalink
#171: Preserve some extended result code that were lost
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Mar 1, 2017
1 parent 846604c commit b873162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GRDB/Core/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ extension Database {
if let message = error.message {
sqlite3_result_error(context, message, -1)
}
sqlite3_result_error_code(context, error.resultCode.rawValue)
sqlite3_result_error_code(context, error.extendedResultCode.rawValue)
} catch {
sqlite3_result_error(context, "\(error)", -1)
}
Expand Down
2 changes: 1 addition & 1 deletion GRDB/FTS/FTS3Pattern.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public struct FTS3Pattern {
}
} catch let error as DatabaseError {
// Remove private SQL & arguments from the thrown error
throw DatabaseError(resultCode: error.resultCode, message: error.message, sql: nil, arguments: nil)
throw DatabaseError(resultCode: error.extendedResultCode, message: error.message, sql: nil, arguments: nil)
}

// Pattern is valid
Expand Down

0 comments on commit b873162

Please sign in to comment.