腾讯定位 SDK 错误对象接口。

继承自标准 Error 对象,扩展了错误码和可选的附加数据字段。

Since

1.0.0

interface TencentLocationError<T> {
    code: number;
    data?: T;
    name: string;
    message: string;
    stack?: string;
}

Type Parameters

  • T = void

    附加数据的类型,默认为 void

Hierarchy

  • Error
    • TencentLocationError

Properties

code: number

错误码。

对应 TencentLocationErrorCode 枚举中的值

Since

1.0.0

data?: T

可选的附加错误数据。

用于携带额外的错误上下文信息

Since

1.0.0

name: string
message: string
stack?: string