mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-25 19:01:16 +01:00
updated error handling for DataStack methods, updated migration demo app
This commit is contained in:
@@ -47,22 +47,22 @@ class CoreStoreTests: XCTestCase {
|
||||
CoreStore.defaultStack = stack
|
||||
XCTAssert(CoreStore.defaultStack === stack, "CoreStore.defaultStack === stack")
|
||||
|
||||
switch stack.addSQLiteStoreAndWait(fileName: "ConfigStore1.sqlite", configuration: "Config1", resetStoreOnMigrationFailure: true){
|
||||
do {
|
||||
|
||||
try stack.addSQLiteStoreAndWait(fileName: "ConfigStore1.sqlite", configuration: "Config1", resetStoreOnMigrationFailure: true)
|
||||
}
|
||||
catch let error as NSError {
|
||||
|
||||
case .Failure(let error):
|
||||
XCTFail(error.description)
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
switch stack.addSQLiteStoreAndWait(fileName: "ConfigStore2.sqlite", configuration: "Config2", resetStoreOnMigrationFailure: true){
|
||||
do {
|
||||
|
||||
try stack.addSQLiteStoreAndWait(fileName: "ConfigStore2.sqlite", configuration: "Config2", resetStoreOnMigrationFailure: true)
|
||||
}
|
||||
catch let error as NSError {
|
||||
|
||||
case .Failure(let error):
|
||||
XCTFail(error.description)
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
let detachedTransaction = CoreStore.beginDetached()
|
||||
|
||||
Reference in New Issue
Block a user