Skip to content

Comments

refactor(cpp): 更新CMake配置和异常处理逻辑#75

Merged
yndu13 merged 2 commits intomasterfrom
fix-static
Feb 10, 2026
Merged

refactor(cpp): 更新CMake配置和异常处理逻辑#75
yndu13 merged 2 commits intomasterfrom
fix-static

Conversation

@TsinghuaDream
Copy link
Collaborator

  • 替换默认CMake模板为更现代的CMakeLists.modern.txt配置
  • 新增和优化多个测试和示例项目的CMakeLists文件
  • 修改异常捕获从Darabonba::Exception到std::exception和Darabonba::DaraException
  • 调整抛出异常逻辑,使用Darabonba::UnretryableException封装异常上下文
  • 清理未使用的异常成员变量声明
  • 新增CMake代码覆盖率支持脚本和测试配置
  • 调整导入依赖逻辑,改进darabonba_core库的获取和使用机制

- 替换默认CMake模板为更现代的CMakeLists.modern.txt配置
- 新增和优化多个测试和示例项目的CMakeLists文件
- 修改异常捕获从Darabonba::Exception到std::exception和Darabonba::DaraException
- 调整抛出异常逻辑,使用Darabonba::UnretryableException封装异常上下文
- 清理未使用的异常成员变量声明
- 新增CMake代码覆盖率支持脚本和测试配置
- 调整导入依赖逻辑,改进darabonba_core库的获取和使用机制
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


weeping seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

- 调整libs字符串拼接格式,保证CMakeLists.txt格式规范
- 优化生成模型和异常类的to_json/from_json方法,支持无字段类的空实现
- 修正module相关头文件导入逻辑,避免重复或遗漏
- 修改map类型访问表达式,避免使用.at改为.value以兼容any类型
- 替换异常处理逻辑,改为使用std::exception_ptr捕获和重新抛出异常
- 删除多余的_lastRequest和_lastResponse变量,改用_lastExceptionPtr优化异常上下文处理
- 更新生成的CMakeLists.modern.txt中libs部分缩进格式
- 增加.gitignore忽略products和tests/temp-output目录
- 修正测试客户端代码中异常捕获和重试逻辑,统一使用std::exception_ptr存储异常
- 补充多处异常类to_json友元函数的实现,完善序列化支持
@yndu13 yndu13 merged commit b539dab into master Feb 10, 2026
6 of 7 checks passed
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.

3 participants