Class BluetoothException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.codename1.bluetooth.BluetoothException
Thrown via the failure path of every
AsyncResource returned by the
Bluetooth APIs. getError() returns a typed BluetoothError so callers
can react without string-matching the message; for
BluetoothError.GATT_ERROR failures getGattStatus() additionally
exposes the raw ATT status code reported by the remote device.-
Constructor Summary
ConstructorsConstructorDescriptionBluetoothException(BluetoothError error) BluetoothException(BluetoothError error, String message) BluetoothException(BluetoothError error, String message, int gattStatus) BluetoothException(BluetoothError error, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptiongetError()Typed error code describing the failure.intThe raw ATT status code reported by the remote GATT server whengetError()isBluetoothError.GATT_ERROR;-1otherwise.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BluetoothException
-
BluetoothException
-
BluetoothException
-
BluetoothException
-
-
Method Details
-
getError
Typed error code describing the failure. Nevernull. -
getGattStatus
public int getGattStatus()The raw ATT status code reported by the remote GATT server whengetError()isBluetoothError.GATT_ERROR;-1otherwise.
-