mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 20:24:16 +08:00
- Package directory: src/xmtdx/ -> src/easy_tdx/ - Import path: from easy_tdx import ... - pip install easy-tdx - Add LICENSE (MIT) with upstream attribution (pytdx, xmtdx) - Add NOTICE with detailed attribution - Update all examples, tests, scripts, docs - Bump version to 1.0.0 BREAKING CHANGE: import path changed from `xmtdx` to `easy_tdx` Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
26 lines
526 B
Python
26 lines
526 B
Python
"""easy-tdx 异常层次"""
|
|
|
|
|
|
class TdxError(Exception):
|
|
"""所有 easy-tdx 异常的基类"""
|
|
|
|
|
|
class TdxConnectionError(TdxError):
|
|
"""TCP 连接失败或超时"""
|
|
|
|
|
|
class TdxDecodeError(TdxError):
|
|
"""响应报文解析失败"""
|
|
|
|
|
|
class TdxCommandError(TdxError):
|
|
"""命令执行失败(服务器返回错误)"""
|
|
|
|
|
|
class TdxFileNotFoundError(TdxError):
|
|
"""本地数据文件不存在"""
|
|
|
|
|
|
class TdxOfflineError(TdxError):
|
|
"""离线数据读取失败(路径未配置、文件格式错误等)"""
|