BackupActionResult.Failure


class BackupActionResult.Failure : BackupActionResult


Indicates that the device payload failed during execution or verification.

Summary

Public constructors

Failure(
    errorMessage: String,
    stackTrace: String?,
    data: Map<String, String>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

open Map<String, String>

Data that the action returned, such as values it read on the device.

String

The high-level error message or exception summary.

String?

The optional serialized stack trace of any caught device-side exceptions.

Inherited functions

From androidx.test.backup.host.BackupActionResult
Map<String, String>

Returns the data of a Success, or throws an IOException for a Failure, as BackupRestoreController.runBackupRestoreFlow does when one of its actions fails.

Inherited properties

From androidx.test.backup.host.BackupActionResult
Boolean

Returns true if this is a Success result.

Public constructors

Failure

Added in 1.0.0-alpha04
Failure(
    errorMessage: String,
    stackTrace: String? = null,
    data: Map<String, String> = emptyMap()
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

data

open val data: Map<String, String>

Data that the action returned, such as values it read on the device. Empty if the action returned none or didn't run to completion. The data of a Failure leaves out the status and error of the action, which Failure.errorMessage reports. A result keeps a copy of the data that it's created with.

errorMessage

Added in 1.0.0-alpha04
val errorMessage: String

The high-level error message or exception summary.

stackTrace

Added in 1.0.0-alpha04
val stackTrace: String?

The optional serialized stack trace of any caught device-side exceptions.