异常后 Clojure REPL 无响应
如果我启动 REPL,然后执行一些引发异常的操作,例如 (use 'non-existent-thing)
**,那么此后 REPL 将停止评估我输入的任何内容。是否有一个特殊的按键我可以按下让它转过来,面向我,松开双臂并再次聆听?或者我必须按 ctrl-d,重新启动,输入所有内容,直到这次正确为止?
结果是:
线程“Thread-1”中的异常java.lang.RuntimeException:java.io.FileNotFoundException:无法在类路径上找到non_existent_thing__init.class或non_existent_thing.clj:(NO_SOURCE_FILE:0)
编辑:我应该提到我正在使用lein重复
If I start a REPL and then do something that throws an exception like (use 'non-existent-thing)
** then after that the REPL ceases to evaluate anything I enter. Is there a special key I can press to make it turn round, face me, uncross its arms and listen once more ? Or must I ctrl-d, restart, type everything up to where I was and get it right this time ?
which results in:
Exception in thread "Thread-1" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate non_existent_thing__init.class or non_existent_thing.clj on classpath: (NO_SOURCE_FILE:0)
edit: I should have mentioned that I'm using lein repl
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从未见过这种情况,而且我在 Windows、Linux 和 OSX 上使用过 lein repl。唯一有点奇怪的是我必须按一次或两次 Enter 键才能返回 repl 提示。
以防万一...您使用什么版本的 leiningen?最近的 JDK? Clojure 版本?
I've never seen that and I've use lein repl on Windows, Linux and OSX. The only thing that's a little strange is that I have to tap enter once or twice to the repl prompt back.
Just in case... What version of leiningen do you use? Recent JDK? Clojure version?