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)
-
DB file has errors, e.g. illegal values or structural inconsistencies were detected.
Declaration
Swift
case fileCorrupt(message: String)
-
DB file has errors related to pages, e.g. bad page refs outside of the file.
Declaration
Swift
case filePagesCorrupt(message: String)
-
Attempted to establish a relation to an entity that hasn’t been assigned an ID yet.
Declaration
Swift
case cannotRelateToUnsavedEntities(message: String)
-
Typically when there’s no open store available at the given directory
Declaration
Swift
case cannotAttachToStore(message: String)
-
Unexpected error, should never occur in practice, but for pragmatic reasons, we cover the case. Used in some cases where ObjectBox e.g. calls a function (which can only say throws and not what it throws) If you encounter this error in your use of ObjectBox, please report it to us, as it’s likely a bug in the binding.
Declaration
Swift
case unexpected(error: Error)
-
An error related to sync
Declaration
Swift
case sync(message: String)