Skip to content

Comments

fix(cli): 改进导入错误处理和退出码#46

Merged
mic1on merged 1 commit intomainfrom
fix/import-error-handling
Jan 26, 2026
Merged

fix(cli): 改进导入错误处理和退出码#46
mic1on merged 1 commit intomainfrom
fix/import-error-handling

Conversation

@nowanti
Copy link
Collaborator

@nowanti nowanti commented Jan 26, 2026

增强 CLI 模块的异常处理,为不同的导入失败情况提供更准确的错误信息和退出码:

  • 当指定的步模块不存在时,返回退出码 2 并输出相应错误
  • 当导入因缺少依赖或其他异常失败时,返回退出码 1 并记录详细原因
  • 添加 KeyboardInterrupt 的退出码 130 以符合 Unix 信号约定
  • 新增测试以验证不同错误场景的处理逻辑

增强 CLI 模块的异常处理,为不同的导入失败情况提供更准确的错误信息和退出码:
- 当指定的步模块不存在时,返回退出码 2 并输出相应错误
- 当导入因缺少依赖或其他异常失败时,返回退出码 1 并记录详细原因
- 添加 KeyboardInterrupt 的退出码 130 以符合 Unix 信号约定
- 新增测试以验证不同错误场景的处理逻辑
@nowanti nowanti requested a review from mic1on January 26, 2026 06:37
@mic1on mic1on merged commit 1697ac8 into main Jan 26, 2026
8 checks passed
@mic1on mic1on deleted the fix/import-error-handling branch January 26, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants