Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Created November 21, 2016 17:18
Show Gist options
  • Save zhouqiang-cl/78767b347af5b28183df5025a3825861 to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/78767b347af5b28183df5025a3825861 to your computer and use it in GitHub Desktop.
common lisp 函数 error
语法
error datum &rest arguments
参数和值
datum, arguments --- 错误提示, 通常是一个 simple-error 对象
描述
error 当条件发生时,产生一个错误信号
代码
* (setq a 'fred)
FRED
* (if (numberp a) (1+ a) (error "~S is not a number." A))
debugger invoked on a SIMPLE-ERROR: FRED is not a number.
接着进入了中断
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment