LockError

sealed class LockError : Throwable

To provide specific error to the outcome of any lock functions (unlock, lock, prepareEndRental)

Parameters

code

String value of the error code

message

formatted String value that is translated into more languages to display on the UI

logMessage

String value to display in Logcat

detail

optional String value to determine deeper cause of the error. Usually null, but in cases like FatalError it will provide more info.

Inheritors

Types

Link copied to clipboard
data object BluetoothOff : LockError

Bluetooth is turned off on the phone device, notify user to enable it in order to perform the action.

Link copied to clipboard

The app does not have bluetooth permission, notify user to allow using bluetooth in order to perform the action.

Link copied to clipboard
object Companion

Helper String values for detail

Link copied to clipboard
data class ConnectionError(val originalCause: String?) : LockError

The app could not establish connection to the bluetooth device due to an error. Check detail to find out more information.

Link copied to clipboard

The app could not establish connection to the bluetooth device due to it taking too long. Notify user to keep the phone close to the bluetooth device and try again.

Link copied to clipboard
data class ExtraLockCheckFailed(val timeSinceStart: Millisecond) : LockError
Link copied to clipboard
data class FatalError(val originalCause: String?) : LockError

When unexpected error shows up during processes not related to establishing connection. Check detail to find out more information.

Link copied to clipboard
data object HitSpoke : LockError
Link copied to clipboard

When the provided device name does not match any known lock type format.

Link copied to clipboard
data object LocationOff : LockError

Location Services are turned off on the phone device, notify user to enable it in order to perform the action.

Link copied to clipboard

The app does not have location permission, notify user to allow using of location in order to perform the action.

Link copied to clipboard
data object LockBroken : LockError
Link copied to clipboard
data class LockCommandError(val originalCause: Throwable) : LockError

When unexpected error show ups during sending lock command to bluetooth device

Link copied to clipboard
data object LockMoving : LockError
Link copied to clipboard
data object LockTimeout : LockError

The bluetooth device wasn't locked in specified time. Notify the user to physically push the lock to lock it when trying to perform lock again.

Link copied to clipboard

During the first unlock for the eKey, the app should be online to determine whether it was properly picked up. If not, this error gets thrown.

Link copied to clipboard
data object OutOfKeys : LockError

When eKey has run out of the available commands for performing action on the lock. Please use new eKey if this occurs.

Link copied to clipboard

During special conditions, this error can be thrown upon reading characteristics when lock isn't properly locked.

Link copied to clipboard
data object SearchTimeout : LockError

The app could not find the advertisement of the searched bluetooth device

Link copied to clipboard
data class UnlockCommandError(val originalCause: Throwable) : LockError

When unexpected error show ups during sending unlock command to bluetooth device

Link copied to clipboard
data object UnlockTimeout : LockError

The bluetooth device didn't unlock in specified time

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val message: String