mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
NSLocalizedDescriptionKey
This commit is contained in:
1 parent
badec62cdd
commit
2fd071d90e
2 files changed
+3
-3
No files matched your search
@@ -411,7 +411,7 @@ class DatabaseAggregateTests: GRDBTestCase {
|
||||
func testAggregateStepThrowingCustomError() throws {
|
||||
struct Aggregate : DatabaseAggregate {
|
||||
func step(_ dbValues: [DatabaseValue]) throws {
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"])
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"])
|
||||
}
|
||||
func finalize() -> DatabaseValueConvertible? {
|
||||
fatalError()
|
||||
@@ -502,7 +502,7 @@ class DatabaseAggregateTests: GRDBTestCase {
|
||||
struct Aggregate : DatabaseAggregate {
|
||||
func step(_ dbValues: [DatabaseValue]) { }
|
||||
func finalize() throws -> DatabaseValueConvertible? {
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"])
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"])
|
||||
}
|
||||
}
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
|
||||
@@ -335,7 +335,7 @@ class DatabaseFunctionTests: GRDBTestCase {
|
||||
func testFunctionThrowingCustomError() throws {
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
let fn = DatabaseFunction("f") { dbValues in
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"])
|
||||
throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"])
|
||||
}
|
||||
dbQueue.add(function: fn)
|
||||
try dbQueue.inDatabase { db in
|
||||
|
||||
Reference in new issue
Block a user