Files
easy-tdx/src/easy_tdx/exceptions.py
T
GitHubandClaude Opus 4.7 50491f9aae feat!: rename project from xmtdx to easy-tdx
- 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>
2026-05-21 23:21:21 +08:00

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):
"""离线数据读取失败(路径未配置、文件格式错误等)"""