racket 异常处理示例代码
代码语言:racket
所属分类:其他
代码描述:racket 异常处理示例代码
代码标签: 示例
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
#lang racket (with-handlers ([exn:fail? (lambda (exn) 999)]) (+ 1 "2")) ; => 999 (with-handlers ([exn:break? (lambda (exn) "no time")]) (sleep 3) "phew") ; => "phew", but if you break.........完整代码请登录后点击上方下载按钮下载查看
网友评论0