How can I improve clisp error messages?

人盡茶涼 提交于 2019-12-22 18:06:37

问题


I have been dabbling a little with clisp. It is a little perplexing that it doesn't print out the line number an error is at. Or, at least a general hint where the error is located. In some cases that must be possible, right? Is there any way I can get better error messages?


回答1:


As in most questions I see involving clisp, the answer is probably "don't use clisp".

As you might be aware, clisp is but one of many implementations of Common Lisp, and probably not one of the more popular ones. SBCL, Clozure, Allegro, and LispWorks are probably better choices for most tasks.

edit:

Also, using SLIME in emacs to debug your programs helps a good deal. You might get better debugger output even from clisp (and the others) using SLIME.




回答2:


First of all, Lisp reader reads forms, not lines, so "line number" makes little sense to it.

That said, Lisp knows the lines where the form starts and ends, and those values are actually reported by SLIME. The reason they are not reported by default is that it is assumed that the debugger will make this information accessible in situations where it is necessary and appropriate.



来源:https://stackoverflow.com/questions/1060979/how-can-i-improve-clisp-error-messages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!