如何改进 clisp 错误消息?

发布于 2024-07-25 22:48:39 字数 103 浏览 10 评论 0原文

我已经接触过一些clisp。 有点令人困惑的是它没有打印出错误所在的行号。 或者,至少给出错误所在的一般提示。 在某些情况下这一定是可能的,对吧? 有什么方法可以获得更好的错误消息吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

未蓝澄海的烟 2024-08-01 22:48:39

正如我看到的大多数涉及 clisp 的问题一样,答案可能是“不要使用 clisp”。

您可能知道,clisp 只是 Common Lisp 的众多实现之一,而且可能不是更流行的实现之一。 对于大多数任务来说,SBCL、Clozure、Allegro 和 LispWorks 可能是更好的选择。

编辑:

此外,在 emacs 中使用 SLIME 来调试程序也有很大帮助。 即使使用 SLIME 从 clisp(和其他)中,您也可能获得更好的调试器输出。

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.

海风掠过北极光 2024-08-01 22:48:39

首先,Lisp 阅读器读取表单,而不是,因此“行号”对它来说没有什么意义。

也就是说,Lisp 知道表单开始和结束的行,并且这些值实际上是由 SLIME 报告的。 默认情况下不报告它们的原因是 假定调试器将执行此操作在必要且适当的情况下可获取的信息

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文