diff --git a/GRDB/Core/Database.swift b/GRDB/Core/Database.swift index 18dc1cd6fe..413f789f16 100644 --- a/GRDB/Core/Database.swift +++ b/GRDB/Core/Database.swift @@ -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) } diff --git a/GRDB/FTS/FTS3Pattern.swift b/GRDB/FTS/FTS3Pattern.swift index 1f141aff9b..d453b2ef77 100644 --- a/GRDB/FTS/FTS3Pattern.swift +++ b/GRDB/FTS/FTS3Pattern.swift @@ -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