get Or Throw
Returns the success value if this is a Success, or throws the exception if this is a Failure.
Use this method when you want to propagate failures as exceptions.
try {
val data = result.getOrThrow()
processData(data)
} catch (e: BleException) {
handleError(e)
}Content copied to clipboard
Return
The success value.
Throws
If this is a Failure.