ObjectBoxError

public enum ObjectBoxError : Swift.Error

Error codes thrown by ObjectBox APIs.

  • Unexpected obx_err propagated from C core to Swift.

    Declaration

    Swift

    case unknown(code: Int32, message: String)
  • Attempt to open a write transaction nested in a read-only transaction.

    Declaration

    Swift

    case cannotWriteWhileReading(message: String)
  • Asked to put an entity/property change that would cause a unique property to be present twice.

    Declaration

    Swift

    case uniqueViolation(message: String)
  • Asked to obtain an entity that does not exist (e.g. nonexistent ID, no query results).

    Declaration

    Swift

    case notFound(message: String)
  • Thrown when a request does not make sense in the current state. For example, doing actions on a closed object.

    Declaration

    Swift

    case illegalState(message: String)
  • Nonsense value given to an API call.

    Declaration

    Swift

    case illegalArgument(message: String)
  • Thrown when a resource could not be allocated.

    Declaration

    Swift

    case allocation(message: String)
  • An unexpected error.

    Declaration

    Swift

    case noErrorInfo(message: String)
  • An unexpected error.

    Declaration

    Swift

    case general(message: String)
  • Size limit given when database was opened was exceeded.

    Declaration

    Swift

    case dbFull(message: String)
  • The limit on the number of simultaneous read transactions specified when creating the Store has been exceeded.

    Declaration

    Swift

    case maxReadersExceeded(message: String)
  • Can not continue, the Store must be closed.

    Declaration

    Swift

    case storeMustShutdown(message: String)
  • A general storage-related error.

    Declaration

    Swift

    case storageGeneral(message: String)
  • User asked for a unique result, database contains several matches.

    Declaration

    Swift

    case nonUniqueResult(message: String)
  • Property requested with a type incompatible with what is actually in the database.

    Declaration

    Swift

    case propertyTypeMismatch(message: String)
  • A constraint specified on a database field has been violated.

    Declaration

    Swift

    case constraintViolated(message: String)
  • An illegal argument bubbled up into the C++ core.

    Declaration

    Swift

    case stdIllegalArgument(message: String)
  • A range exceeds what is actually present internally.

    Declaration

    Swift

    case stdOutOfRange(message: String)
  • A length limit has been exceeded.

    Declaration

    Swift

    case stdLength(message: String)
  • Memory error (asking for a huge amount by accident?).

    Declaration

    Swift

    case stdBadAlloc(message: String)
  • A floating point value has exceeded its defined range.

    Declaration

    Swift

    case stdRange(message: String)
  • An integral value has exceeded its defined range.

    Declaration

    Swift

    case stdOverflow(message: String)
  • An unexpected error occurred in the C++ core.

    Declaration

    Swift

    case stdOther(message: String)
  • The database schema does not match. (Is there a problem with your model.json?)

    Declaration

    Swift

    case schema(message: String)
  • The database file has errors, e.g. has a structural inconsistency.

    Declaration

    Swift

    case fileCorrupt(message: String)
  • Error in the storage engine. Currently only used for error #2 thrown for files not found.

    Declaration

    Swift

    case storage(code: Int32, message: String)