Standardize exception handling
还没有人认领这个 Issue。
评估
调研方向
首先检查列出的 dl-serve、calibration()、Entity、Interface._send_request()、ReturnCodes.py 和 ThrowReply 路径,然后阅读链接的 dripline-cpp issue 103。也请检查尚未审查的 Implementations。当 Caller、Execution 和 Details 之间的异常行为一致,并且预期的传播或捕获已得到验证时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Exception handling in dl-cpp: https://github.com/driplineorg/dripline-cpp/issues/103
The primary execution of most actions in dl-py takes place in C++, so most error handling will end up in the C++ code. Between C++ and Python the typical sequence of stages is Caller (Python) --> Execution (C++) --> Details (Python). Details includes things like doing calibrations. Most time is spent in the Execution and Details stages, and the Execution stage is typically responsible for the final error handling and making decisions about whether to exit the application. So we need to ensure that the error handling drops back to the C++ in the right ways.
Caller stage
- dl-serve
- Calls
service::listen()and checks boolean return - Raises RuntimeError to exit if necessary
- Calls
Execution stage
See https://github.com/driplineorg/dripline-cpp/issues/103
Details stage
- ✅ AlertConsumer
- Does not raise exceptions
- ❌ Calibrate
calibration()- raises
exceptions.DriplineValueError - This is the calibration decorator, which will be called when responding to a request
- Therefore this is not the right use of
DriplineValueError
- raises
- ✅ Endpoint
- Several functions
- Raises only ThrowReply
- Several functions
- ❓ Entity
- Several functions
- Raise ValueError
- Question Is this right? Are these caught somewhere?
- Several functions
- ✅ Interface
_send_request()- Raises DriplineError
- Called by
get(),set(), andcmd()- Not caught
- Will pass exception up to the user of Interface
- ✅ ReturnCodes.py
- Does not raise exceptions
- ✅ ThrowReply
- Does not raise exceptions
I have not checked any code in Implementations.
- 主要语言
- Python
- 星标
- 3
- 派生
- 6
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
driplineorg/dripline-python 的其他 Issue
-
Log on set delay未关闭
难度 4/5 3-5 天 新手友好度 38/100
driplineorg/dripline-python#222 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 30/100
driplineorg/dripline-python#221 ·
-
难度 2/5 1-3 小时 新手友好度 50/100
driplineorg/dripline-python#214 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
driplineorg/dripline-python#207 ·
-
Inconsistent response behavior with a 'values' array可能重新可做 @pkolbeck 于 493 天前认领,目前没有进行中的 PR。 未关闭
driplineorg/dripline-python#204 · 1 条评论 · 已指派 2 人 ·
查看 driplineorg/dripline-python 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
维护者通常 1 天内回复
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭difficulty:2 enhancement good first issue
难度 1/5 1-3 小时 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
维护者通常 1 天内回复
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未关闭
难度 2/5 1-3 小时 新手友好度 75/100
scverse/rapids-singlecell#854 ·
维护者通常 1 天内回复
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 于 1 天前认领。 未关闭area:frontend backend:slang bug direction:input
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=False可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 13 天内回复