Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

资源分配失败 #18

Open
FrankHB opened this issue Apr 17, 2020 · 1 comment
Open

资源分配失败 #18

FrankHB opened this issue Apr 17, 2020 · 1 comment

Comments

@FrankHB
Copy link

FrankHB commented Apr 17, 2020

文档中应该描述 newimage 等资源分配函数失败的条件。
因为现在使用 new 实现,所以 newimage 不会返回空指针。
这些应该在文档中明确。

@FrankHB
Copy link
Author

FrankHB commented Apr 17, 2020

Proposed wording

任何 EGE API 函数若明确任意参数(若存在)都不会引起调用失败,则可能隐含 noexcept
否则,失败的函数可能抛出类型为 std::exception 或其派生类的异常。
分配资源失败的函数,应抛出类型为 std::bad_alloc 或其派生类的异常。
分配资源失败的条件由各个 API 指定。

(下略。)

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

No branches or pull requests

1 participant