forked from parallel101/course
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
3,046 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} | ||
``` |
Oops, something went wrong.