mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2026-01-16 04:07:13 +08:00
deploy: f15fcec338
This commit is contained in:
@@ -528,7 +528,7 @@
|
||||
<div class="sidetoc"><nav class="pagetoc"></nav></div>
|
||||
|
||||
<main>
|
||||
<ul dir="auto"><li><em>凹语言(Go实现, 面向WASM设计): <a href="https://github.com/wa-lang/wa">https://github.com/wa-lang/wa</a></em></li><li><em>WaBook(Go语言实现的MD电子书构建工具): <a href="https://github.com/wa-lang/wabook">https://github.com/wa-lang/wabook</a></em></li></ul><hr>
|
||||
<ul dir="auto"><li><em>凹语言(Go实现, 面向WASM设计): <a href="https://github.com/wa-lang/wa">https://github.com/wa-lang/wa</a></em></li><li><em>《Go语言高级编程》: <a href="https://github.com/chai2010/advanced-go-programming-book">https://github.com/chai2010/advanced-go-programming-book</a></em></li></ul><hr>
|
||||
|
||||
<h2>5.10. Recover捕获异常</h2>
|
||||
<p>通常来说,不应该对panic异常做任何处理,但有时,也许我们可以从异常中恢复,至少我们可以在程序崩溃前,做一些操作。举个例子,当web服务器遇到不可预料的严重问题时,在崩溃前应该将所有的连接关闭;如果不做任何处理,会使得客户端一直处于等待状态。如果web服务器还在开发阶段,服务器甚至可以将异常信息反馈到客户端,帮助调试。</p>
|
||||
|
||||
Reference in New Issue
Block a user