5de74b543a
VDE-001 through VDE-013 all resolved in v1.0.1 ViewDesign workarounds can now be removed
893 B
893 B
id, status, severity, category, date, reporter
| id | status | severity | category | date | reporter |
|---|---|---|---|---|---|
| VDE-011 | fixed | medium | api | 2026-07-27 | ViewDesign |
VDE-011: write_stl / write_stl_ascii 返回 void
问题描述
write_stl() 和 write_stl_ascii() 的返回类型为 void,调用者无法判断写入是否成功。规范的做法是返回 bool 或抛出异常(如 read_stl 所做的)。函数签名:
void write_stl(const std::string& filepath, const std::vector<StlTriangle>& tris);
影响文件
- include/vde/foundation/io_stl.h
ViewDesign 侧 Workaround
调用后假定成功,返回 true。
建议修复方向
- 改为返回 bool(或 std::expected<void, Error> 在 C++23)
- 像 read_stl 一样在失败时抛出 std::runtime_error
- 至少应在文档中说明该函数如何报告写入失败
此文件由 ViewDesign 工程自动生成。处理完成后请更新 status 字段。