跳转到正文

config_errors API ​

完整接口目录 · 配置与密钥用法 · 工具包下载

模块说明 ​

text
Configuration diagnostics contain locations and guidance, never input values.

ConfigError ​

python
class ConfigError(ValueError)

SDK 说明:

text
A safe, machine-readable configuration failure.

Callers must use declaration-owned paths and static guidance, not interpolate
configuration values or arbitrary exception messages into these fields.

ConfigError.__init__ ​

python
def __init__(
    self,
    code,
    path = 'config',
    *,
    expected = None,
    hint = None,
    line = None,
    column = None,
)

ConfigError.as_dict ​

python
def as_dict(self)

另继承外部类型 ValueError;其通用方法不在本 SDK 目录中重复展开。

ConfigError.code ​

python
self.code

公开实例属性,在 __init__ 中设置。

ConfigError.path ​

python
self.path

公开实例属性,在 __init__ 中设置。

ConfigError.expected ​

python
self.expected

公开实例属性,在 __init__ 中设置。

ConfigError.hint ​

python
self.hint

公开实例属性,在 __init__ 中设置。

ConfigError.line ​

python
self.line

公开实例属性,在 __init__ 中设置。

ConfigError.column ​

python
self.column

公开实例属性,在 __init__ 中设置。

Neomega · 使用、开发与参考文档