GenerativeAIException


public sealed class GenerativeAIException extends Exception

已知的直接子类
ConnectionException

连接时出错。

DownloadException

下载时出错。

InferenceException

推理期间出错。

PreparationException

准备过程中出错。

TokenizationException

令牌化期间出错。

UnknownException

未知错误。


GenerativeModel 中发生的所有错误的父类。

摘要

嵌套类型

一组 GenerativeAIException 错误代码。

受保护的构造函数

GenerativeAIException(
    @NonNull String message,
    Throwable cause,
    @GenerativeAIException.ErrorCode int errorCode
)

公共方法

final int

受保护的构造函数

GenerativeAIException

protected GenerativeAIException(
    @NonNull String message,
    Throwable cause,
    @GenerativeAIException.ErrorCode int errorCode
)

公共方法

getErrorCode

public final int getErrorCode()