mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-22 09:29:45 +01:00
Added new error for cases when addStorageAndWait() is used with .allowSynchronousLightweightMigration but migrations are only allowed asynchronously (related to #277)
This commit is contained in:
@@ -345,6 +345,18 @@ public final class DataStack: Equatable {
|
||||
)
|
||||
return storage
|
||||
}
|
||||
catch let error as NSError where storage.localStorageOptions.contains(.allowSynchronousLightweightMigration) && error.isCoreDataMigrationError {
|
||||
|
||||
let storeError = CoreStoreError.asynchronousMigrationRequired(
|
||||
localStoreURL: fileURL,
|
||||
NSError: error
|
||||
)
|
||||
CoreStore.log(
|
||||
storeError,
|
||||
"Failed to add \(cs_typeName(storage)) to the stack."
|
||||
)
|
||||
throw storeError
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user