EOF exception while reading clojure file
Asked Answered
B

1

12

When I run the web application in the ring jetty server, I got EOF exception, I can't fix this, since there is no clue on which line the error has occurred. I'm using compojure and hiccup on my clojure code. I'm using Emacs 23 as editor.

Here is the part of the exception :

Exception in thread "main" java.lang.Exception: EOF while reading (core.clj:66)
        at clojure.lang.Compiler.load(Compiler.java:5863)
        at clojure.lang.RT.loadResourceScript(RT.java:340)
        at clojure.lang.RT.loadResourceScript(RT.java:331)
.................
............
.........
.....

How can I fix it? Thanks!

Barram answered 17/7, 2011 at 6:34 Comment(0)
J
20

I guess you've got mismatched parentheses, brackets or braces. In Emacs, try M-x show-paren-mode, then put your cursor on various parentheses in the file (starting with the first) to figure out which ones are unmatched.

Joellyn answered 17/7, 2011 at 7:21 Comment(2)
I would recommend you to use paredit-mode - it simplify work with s-expressions greatelyFash
I agree, Alex! Never see an unmatched paren again! :-) The only trouble is, it becomes annoying to program in non-lisps after mastering paredit...Joellyn

© 2022 - 2024 — McMap. All rights reserved.