BackupActionResult.Failure


public final class BackupActionResult.Failure extends BackupActionResult


Indicates that the device payload failed during execution or verification.

Summary

Public constructors

Failure(
    @NonNull String errorMessage,
    String stackTrace,
    @NonNull Map<@NonNull String, @NonNull String> data
)

Public methods

boolean
equals(Object other)
@NonNull Map<@NonNull String, @NonNull String>

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

final @NonNull String

The high-level error message or exception summary.

final String

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

int
@NonNull String

Inherited methods

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

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

final boolean

Returns true if this is a Success result.

Public constructors

Failure

Added in 1.0.0-alpha04
public Failure(
    @NonNull String errorMessage,
    String stackTrace,
    @NonNull Map<@NonNull String, @NonNull String> data
)

Public methods

equals

public boolean equals(Object other)

getData

public @NonNull Map<@NonNull String, @NonNull String> getData()

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.

getErrorMessage

Added in 1.0.0-alpha04
public final @NonNull String getErrorMessage()

The high-level error message or exception summary.

getStackTrace

Added in 1.0.0-alpha04
public final String getStackTrace()

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

hashCode

public int hashCode()

toString

public @NonNull String toString()