2008-01-07
Programming Erlang读书笔记4: Exceptions
关键字: exception
语法:
一些BIFs:
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()
发表评论
- 浏览: 681849 次
- 性别:

- 来自: BJ

- 详细资料
搜索本博客
我的相册
screenshot
共 1 张
共 1 张
最近加入圈子
最新评论
-
Mnesia用户手册:三,构建 ...
要想创建disc_copies和disc_only_copies类型的表有两个前 ...
-- by hideto -
翻译www.djangobook.com之 ...
有个问题问一下: 我先配置了一个urlpatterns是这样的: r'^myd ...
-- by lyhapple -
Why OO sucks
gigix 写道lyl0035 写道为啥就没人想想,其实在面向对象的代码中也流露 ...
-- by hurd -
Why OO sucks
貌似又回到当年java vs c的年代。两种方式,不管是OO还是FP,仅是人处理 ...
-- by python -
大家可以抛弃Java踹死Djan ...
to phoenixup:1,你还别说,你举的什么Struts,Tapestry ...
-- by hideto






评论排行榜