From 7e6dc804b51a784304e8200d20ebab020331d626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=A4=E7=8B=90=E4=B8=80=E5=86=B2?= <43949039+anonymousGiga@users.noreply.github.com> Date: Thu, 18 May 2023 09:19:41 +0800 Subject: [PATCH] Update chapter_3_12.md --- src/chapter_3/chapter_3_12.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chapter_3/chapter_3_12.md b/src/chapter_3/chapter_3_12.md index 4fe8e6e..f5e5c20 100644 --- a/src/chapter_3/chapter_3_12.md +++ b/src/chapter_3/chapter_3_12.md @@ -11,8 +11,11 @@ fn main() { } ``` 运行该程序会打印如下错误: + ![注释](../../assets/16.png) + 运行时添加```RUST_BACKTRACE=1```,可以打印完整的堆栈,上面的代码运行时加```RUST_BACKTRACE=1```的结果如下: + ![注释](../../assets/17.png) ## 3.12.2 用Result处理可恢复错误