Last active
December 14, 2016 12:01
-
-
Save zhouqiang-cl/0ebeb5b366c8094bc2fcdf6758940c21 to your computer and use it in GitHub Desktop.
common lisp 的宏 IGNORE-ERRORS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
ignore-errors form* => result* | |
参数和值 | |
forms --- 一个隐式的 progn | |
results --- 正常情况下, 是 form 的求值结果, 如果抛出了异常, 则是 nil 和 condition | |
描述 | |
ignore-errors 阻止 error 进入调试器 | |
代码 | |
* (setq filename "nosuchfile") | |
"nosuchfile" | |
* (ignore-errors (open filename :direction :input)) | |
NIL | |
#<SB-INT:SIMPLE-FILE-ERROR "~@<~?: ~2I~_~A~:>" {1004B427F3}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment