Skip to content

Commit

Permalink
add dingtalk img
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jul 26, 2023
1 parent cd9eaed commit f4f2449
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,14 @@ see [Build Website](https://github.com/alibaba/yalantinglibs/blob/main/website/R
4. Choose one or more reviewers from contributors: (e.g., qicosmos, poor-circle, PikachuHyA).
5. Get approved and merged.

# Discussion group

DingTalk group

<center>
<img src="./website/docs/public/img/yalantinglibs_ding_talk_group.png" alt="dingtalk" width="200" height="200" align="bottom" />
</center>

## License

yaLanTingLibs is distributed under the Apache License (Version 2.0)
Expand Down
36 changes: 19 additions & 17 deletions include/ylt/thirdparty/iguana/error_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace iguana {

class iguana_category : public std::error_category {
public:
public:
virtual const char *name() const noexcept override {
return "iguana::category";
}
Expand All @@ -24,7 +24,8 @@ class iguana_category : public std::error_category {
int add_message(const std::string &msg) {
if (auto it = err_map_.find(msg); it != err_map_.end()) {
return it->second;
} else {
}
else {
err_++;
err_map_.emplace(msg, err_);
return err_;
Expand Down Expand Up @@ -54,26 +55,27 @@ enum class dom_errc {
};

class iguana_dom_category : public std::error_category {
public:
public:
virtual const char *name() const noexcept override {
return "iguana::dom_category";
}
virtual std::string message(int err_val) const override {
switch (static_cast<dom_errc>(err_val)) {
case dom_errc::ok:
return "ok";
case dom_errc::wrong_type: {
auto it = detail_msg_map_.find(dom_errc::wrong_type);
if (it != detail_msg_map_.end()) {
return std::string("wrong type, ")
.append("real type is ")
.append(it->second);
} else {
return "wrong type";
case dom_errc::ok:
return "ok";
case dom_errc::wrong_type: {
auto it = detail_msg_map_.find(dom_errc::wrong_type);
if (it != detail_msg_map_.end()) {
return std::string("wrong type, ")
.append("real type is ")
.append(it->second);
}
else {
return "wrong type";
}
}
}
default:
return "(unrecognized error)";
default:
return "(unrecognized error)";
}
}

Expand All @@ -95,4 +97,4 @@ inline std::error_code make_error_code(iguana::dom_errc err,

return std::error_code((int)err, instance);
}
} // namespace iguana
} // namespace iguana
8 changes: 8 additions & 0 deletions website/docs/zh/guide/what_is_yalantinglibs.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,14 @@ async_simple是一个C++20协程库,提供各种轻量且易用的组件,帮
4. 提交Pull Request,并选择审核者: (如: qicosmos, poor-circle, PikachuHyA).
5. 通过github的全平台测试,审核者完成审核,代码合入主线。

# 讨论组

钉钉群

<center>
<img src="../../public/img/yalantinglibs_ding_talk_group.png" alt="dingtalk" width="200" height="200" align="bottom" />
</center>

## 许可证

yaLanTingLibs 基于 Apache License (Version 2.0) 开发。
Expand Down

0 comments on commit f4f2449

Please sign in to comment.