RequestSurfacePackageException

public final class RequestSurfacePackageException
extends Exception

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ android.app.sdksandbox.RequestSurfacePackageException


SdkSandboxManager#requestSurfacePackage 擲回的例外狀況

摘要

公用建構函式

RequestSurfacePackageException(int requestSurfacePackageErrorCode, String message)

使用結果代碼和訊息初始化 RequestSurfacePackageException

RequestSurfacePackageException(int requestSurfacePackageErrorCode, String message, Throwable cause)

使用結果代碼、訊息和原因初始化 RequestSurfacePackageException

RequestSurfacePackageException(int requestSurfacePackageErrorCode, String message, Throwable cause, Bundle extraInfo)

使用結果代碼、訊息、原因和額外資訊初始化 RequestSurfacePackageException

公用方法

Bundle getExtraErrorInformation()

傳回建構這個例外狀況所使用的其他錯誤資訊。

int getRequestSurfacePackageErrorCode()

傳回建構這個例外狀況所使用的結果代碼。

繼承方法

公用建構函式

RequestSurfacePackageException

已新增至 API 級別 34
Ad Services Extensions 4 也已納入
public RequestSurfacePackageException (int requestSurfacePackageErrorCode, 
                String message)

使用結果代碼和訊息初始化 RequestSurfacePackageException

參數
requestSurfacePackageErrorCode int:結果代碼。這個值可以是 SdkSandboxManager.REQUEST_SURFACE_PACKAGE_INTERNAL_ERRORSdkSandboxManager.REQUEST_SURFACE_PACKAGE_SDK_NOT_LOADED

message String:透過 Throwable.getMessage() 方法儲存的詳細訊息,以供日後擷取。這個值可以是 null

RequestSurfacePackageException

已新增至 API 級別 34
Ad Services Extensions 4 也已納入
public RequestSurfacePackageException (int requestSurfacePackageErrorCode, 
                String message, 
                Throwable cause)

使用結果代碼、訊息和原因初始化 RequestSurfacePackageException

參數
requestSurfacePackageErrorCode int:結果代碼。這個值可以是 SdkSandboxManager.REQUEST_SURFACE_PACKAGE_INTERNAL_ERRORSdkSandboxManager.REQUEST_SURFACE_PACKAGE_SDK_NOT_LOADED

message String:透過 Throwable.getMessage() 方法儲存的詳細訊息,以供日後擷取。這個值可以是 null

cause Throwable:例外狀況原因,透過 Throwable.getCause() 方法儲存以供日後擷取。如果允許使用空值,表示原因不存在或原因不明。

RequestSurfacePackageException

已新增至 API 級別 34
Ad Services Extensions 4 也已納入
public RequestSurfacePackageException (int requestSurfacePackageErrorCode, 
                String message, 
                Throwable cause, 
                Bundle extraInfo)

使用結果代碼、訊息、原因和額外資訊初始化 RequestSurfacePackageException

參數
requestSurfacePackageErrorCode int:結果代碼。這個值可以是 SdkSandboxManager.REQUEST_SURFACE_PACKAGE_INTERNAL_ERRORSdkSandboxManager.REQUEST_SURFACE_PACKAGE_SDK_NOT_LOADED

message String:透過 Throwable.getMessage() 方法儲存的詳細訊息,以供日後擷取。這個值可以是 null

cause Throwable:例外狀況原因,透過 Throwable.getCause() 方法儲存以供日後擷取。如果允許使用空值,表示原因不存在或原因不明。

extraInfo Bundle:額外的錯誤資訊。如果沒有這類資訊,這個欄位就會空白。此值不能為 null

公用方法

getExtraErrorInformation

已新增至 API 級別 34
Ad Services Extensions 4 也已納入
public Bundle getExtraErrorInformation ()

傳回建構這個例外狀況所使用的其他錯誤資訊。

傳回
Bundle 額外錯誤資訊套裝組合。此值不能為 null

getRequestSurfacePackageErrorCode

已新增至 API 級別 34
Ad Services Extensions 4 也已納入
public int getRequestSurfacePackageErrorCode ()

傳回建構這個例外狀況所使用的結果代碼。

傳回
int SdkSandboxManager#requestSurfacePackage 的結果代碼 值是 SdkSandboxManager.REQUEST_SURFACE_PACKAGE_INTERNAL_ERRORSdkSandboxManager.REQUEST_SURFACE_PACKAGE_SDK_NOT_LOADED