From b873162a6f006cf60a5a2c7355ef8a077fcc6dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 1 Mar 2017 14:19:48 +0100 Subject: [PATCH] #171: Preserve some extended result code that were lost --- GRDB/Core/Database.swift | 2 +- GRDB/FTS/FTS3Pattern.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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