Skip to content

Commit

Permalink
addsingl
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed May 26, 2024
1 parent 5f658ad commit 1a442a1
Show file tree
Hide file tree
Showing 7 changed files with 3,046 additions and 41 deletions.
10 changes: 10 additions & 0 deletions slides/design/error.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# 现代 C++ 的错误处理

```cpp
try {
// 一些可能抛出异常的操作
} catch (exception const &e) {
cout << "发现异常: " << e.what() << '\n';
} catch (...) {
cout << "未知的异常类型\n";
}
```
Loading

0 comments on commit 1a442a1

Please sign in to comment.