`
hideto
  • 浏览: 2652237 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Programming Erlang读书笔记4: Exceptions

阅读更多
语法:
try FuncOrExpressionSequence of
  Pattern1 [when Guard1] -> Expressions1;
  Pattern2 [when Guard2] -> Expressions2;
  ...
catch
  ExceptionType: ExPattern1 [when ExGuard1] -> ExExpressions1;
  ExceptionType: ExPattern2 [when ExGuard2] -> ExExpressions2;
  ...
after
  AfterExpressions
end


一些BIFs:
exit(Why)
throw(Why)
erlang:error(Why)
erlang:get_stacktrace()
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics