BuildError

public class BuildError
extends HarnessException

java.lang.Object
   ↳ com.android.tradefed.error.HarnessException
     ↳ com.android.tradefed.targetprep.BuildError


Thrown if the provided build fails to run.

Summary

Public constructors

BuildError(String reason, DeviceDescriptor descriptor)

This constructor is deprecated. use BuildError(String, com.android.tradefed.command.remote.DeviceDescriptor, com.android.tradefed.result.error.ErrorIdentifier) instead.

BuildError(String reason, DeviceDescriptor descriptor, ErrorIdentifier errorId)

Constructs a new (@link BuildError} with a detailed error message.

BuildError(String reason, DeviceDescriptor descriptor, Throwable cause, ErrorIdentifier errorId)

Constructs a new (@link BuildError} with a detailed error message.

Public methods

String getDeviceSerial()

Return the serial of the device impacted by the BuildError.

Public constructors

BuildError

public BuildError (String reason, 
                DeviceDescriptor descriptor)

This constructor is deprecated.
use BuildError(String, com.android.tradefed.command.remote.DeviceDescriptor, com.android.tradefed.result.error.ErrorIdentifier) instead.

Constructs a new (@link BuildError} with a detailed error message.

Parameters
reason String: an error message giving more details on the build error

descriptor DeviceDescriptor: the descriptor of the device concerned

BuildError

public BuildError (String reason, 
                DeviceDescriptor descriptor, 
                ErrorIdentifier errorId)

Constructs a new (@link BuildError} with a detailed error message.

Parameters
reason String: an error message giving more details on the build error

descriptor DeviceDescriptor: the descriptor of the device concerned

errorId ErrorIdentifier: the error identifier for this error.

BuildError

public BuildError (String reason, 
                DeviceDescriptor descriptor, 
                Throwable cause, 
                ErrorIdentifier errorId)

Constructs a new (@link BuildError} with a detailed error message.

Parameters
reason String: an error message giving more details on the build error

descriptor DeviceDescriptor: the descriptor of the device concerned

cause Throwable: The original cause of the exception

errorId ErrorIdentifier: the error identifier for this error.

Public methods

getDeviceSerial

public String getDeviceSerial ()

Return the serial of the device impacted by the BuildError.

Returns
String