DeviceRuntimeException

public class DeviceRuntimeException
extends HarnessRuntimeException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
    ↳ java.lang.RuntimeException
      ↳ com.android.tradefed.error.HarnessRuntimeException
        ↳ com.android.tradefed.device.DeviceRuntimeException


Gây ra khi một thao tác trên thiết bị không mang lại kết quả như mong đợi.

Ví dụ: "pm list users" (danh sách người dùng pm) được dự kiến sẽ trả về danh sách người dùng. Nếu không làm được như vậy, thì phải đưa ra DeviceRuntimeException vì đã xảy ra sự cố nghiêm trọng.

Tóm tắt

Hàm khởi tạo công khai

DeviceRuntimeException(String msg, ErrorIdentifier errorId)

Tạo DeviceRuntimeException.

DeviceRuntimeException(String msg, Throwable t, ErrorIdentifier errorId)

Tạo DeviceRuntimeException.

Hàm khởi tạo công khai

DeviceRuntimeException

public DeviceRuntimeException (String msg, 
                ErrorIdentifier errorId)

Tạo DeviceRuntimeException.

Tham số
msg String: thông báo lỗi mô tả về lỗi.

errorId ErrorIdentifier: ErrorIdentifier phân loại ngoại lệ.

DeviceRuntimeException

public DeviceRuntimeException (String msg, 
                Throwable t, 
                ErrorIdentifier errorId)

Tạo DeviceRuntimeException.

Tham số
msg String: thông báo lỗi mô tả về lỗi

t Throwable: Throwable cần được gói trong DeviceRuntimeException.

errorId ErrorIdentifier: ErrorIdentifier phân loại ngoại lệ.