Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

新增一系列无异常的 Try* 模式的接口 #125

Open
cyanray opened this issue Nov 15, 2021 · 0 comments
Open

新增一系列无异常的 Try* 模式的接口 #125

cyanray opened this issue Nov 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@cyanray
Copy link
Owner

cyanray commented Nov 15, 2021

比如发送消息(SendMessage),有时候并不在意它能不能发送成功(或者发送失败的原因),现在可以这样写:

try
{
    SendMessage(xxxx, xxxxx);
}
catch(...){}

可以尝试增加类似下面的API,简化一下:

bool TrySendMessage(QQ_t friend, const MessageChain& messages) noexcept;
@cyanray cyanray added the enhancement New feature or request label Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant