Skip to main content

ENUM

ArdkError

public enum ArdkError: Error, Equatable

Errors thrown by the ARDK API.

ArdkError a subset of all the ARDK_Statuscodes returned by the C API, containing just those that can occur in the Swift environment.

Cases​

nullArgument​

case nullArgument

A null argument was passed where a valid value was required.

This typically indicates an internal error, as the Swift wrapper should prevent null arguments from being passed to the C API.

invalidArgument​

case invalidArgument

An invalid argument was provided to the operation.

This occurs when arguments are technically valid (non-null) but contain invalid values, such as out-of-range numbers or malformed data.

invalidOperation​

case invalidOperation

The requested operation cannot be performed in the current state.

For example, trying to start a feature that's already running, or attempting to get data before initialization is complete.

unknown(msg:)​

case unknown(msg: String)

Indicates an internal malfunction. In a working version of ARDK, an application should never see this result code.

Methods​

==(_:_:)​

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

Parameters​

NameDescription
lhsA value to compare.
rhsAnother value to compare.