استثنای زمان اجرای دستگاه

public class DeviceRuntimeException
extends HarnessRuntimeException

شیء جاوا
جاوا.زبان.قابل پرتاب
استثنای جاوا
استثنای زمان اجرا در جاوا
com.android.tradefed.error.HarnessRuntimeException
com.android.tradefed.device.DeviceRuntimeException


زمانی پرتاب می‌شود که یک اقدام دستگاه منجر به نتایج مورد انتظار نشده باشد.

برای مثال: انتظار می‌رود که دستور 'pm list users' لیست کاربران را برگرداند، در غیر این صورت باید به عنوان یک DeviceRuntimeException مطرح شود، زیرا مشکلی پیش آمده است.

خلاصه

سازندگان عمومی

DeviceRuntimeException (String msg, ErrorIdentifier errorId)

یک DeviceRuntimeException ایجاد می‌کند.

DeviceRuntimeException (String msg, Throwable t, ErrorIdentifier errorId)

یک DeviceRuntimeException ایجاد می‌کند.

سازندگان عمومی

استثنای زمان اجرای دستگاه

public DeviceRuntimeException (String msg, 
                ErrorIdentifier errorId)

یک DeviceRuntimeException ایجاد می‌کند.

پارامترها
msg String : یک پیام خطای توصیفی از خطا.

errorId ErrorIdentifier : ErrorIdentifier استثنا را دسته‌بندی می‌کند.

استثنای زمان اجرای دستگاه

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

یک DeviceRuntimeException ایجاد می‌کند.

پارامترها
msg String : یک پیام خطای توصیفی از خطا

t Throwable : Throwable که باید در DeviceRuntimeException قرار گیرد.

errorId ErrorIdentifier : ErrorIdentifier استثنا را دسته‌بندی می‌کند.