Skip to content

Commit

Permalink
Merge pull request #309 from Wangxiz/patch-1
Browse files Browse the repository at this point in the history
fix typo 'abort'
  • Loading branch information
bobzhang authored Sep 29, 2024
2 parents 65c318b + 92b2949 commit 615569d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,5 @@ pub fn fail[T](msg : String, ~loc : SourceLoc = _) -> T!Failure {
可以看出,在作用上其不过是有错误信息模板的构造子,可以输出错误信息和错误对应的文件位置。
实际使用中,`fail!``Failure` 更常用。

其他可以破坏控制流的函数包括 `about``panic`。这两者是等价的。
其他可以破坏控制流的函数包括 `abort``panic`。这两者是等价的。
任一位置的 `panic` 都能在该位置将程序崩溃并输出对应 stack trace。

0 comments on commit 615569d

Please sign in to comment.