# CoreStoreError

    public enum CoreStoreError : Error, CustomNSError, Hashable

    extension CoreStoreError: CustomDebugStringConvertible, CoreStoreDebugStringConvertible

All errors thrown from CoreStore are expressed in `CoreStoreError` enum values.

- `unknown`

  A failure occured because of an unknown error.

  #### Declaration

  Swift

      case unknown

- `differentStorageExistsAtURL(existingPersistentStoreURL:)`

  The `NSPersistentStore` could not be initialized because another store existed at the specified `NSURL`.

  #### Declaration

  Swift

      case differentStorageExistsAtURL(existingPersistentStoreURL: URL)

- `mappingModelNotFound(localStoreURL:targetModel:targetModelVersion:)`

  An `NSMappingModel` could not be found for a specific source and destination model versions.

  #### Declaration

  Swift

      case mappingModelNotFound(localStoreURL: URL, targetModel: NSManagedObjectModel, targetModelVersion: String)

- `progressiveMigrationRequired(localStoreURL:)`

  Progressive migrations are disabled for a store, but an `NSMappingModel` could not be found for a specific source and destination model versions.

  #### Declaration

  Swift

      case progressiveMigrationRequired(localStoreURL: URL)

- `asynchronousMigrationRequired(localStoreURL:NSError:)`

  The `LocalStorage` was configured with `.allowSynchronousLightweightMigration`, but the model can only be migrated asynchronously.

  #### Declaration

  Swift

      case asynchronousMigrationRequired(localStoreURL: URL, NSError: NSError)

- `internalError(NSError:)`

  An internal SDK call failed with the specified `NSError`.

  #### Declaration

  Swift

      case internalError(NSError: NSError)

- `userError(error:)`

  The transaction was terminated by a user-thrown `Error`.

  #### Declaration

  Swift

      case userError(error: Error)

- `userCancelled`

  The transaction was cancelled by the user.

  #### Declaration

  Swift

      case userCancelled

- `persistentStoreNotFound(entity:)`

  Attempted to perform a fetch but could not find any related persistent store.

  #### Declaration

  Swift

      case persistentStoreNotFound(entity: DynamicObject.Type)

- `init(_:)`

  Casts any `Error` to a known `CoreStoreError`, or wraps it in `CoreStoreError.internalError(NSError:)`.

  #### Declaration

  Swift

      public init(_ error: Error?)

### CustomNSError

- `errorDomain`

  #### Declaration

  Swift

      public static var errorDomain: String { get }

- `errorCode`

  #### Declaration

  Swift

      public var errorCode: Int { get }

- `errorUserInfo`

  #### Declaration

  Swift

      public var errorUserInfo: [String : Any] { get }

### Equatable

- `==(_:_:)`

  #### Declaration

  Swift

      public static func == (lhs: CoreStoreError, rhs: CoreStoreError) -> Bool

### Hashable

- `hash(into:)`

  #### Declaration

  Swift

      public func hash(into hasher: inout Hasher)

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }