The exceptions throw when parsing fails could be much more specific and helpful.

Description

The exceptions thrown when edn/clojure code parsing fails are less helpful than they might be:

  • The same message is used in slightly different circumstance. For example "EOF while reading" is used in three slightly different situations in clojure/tools/reader.clj, while "EOF while reading character" is used four times in the same file.

  • The exception messages frequently do not include much of the available context. Which token is bad? Which map contains an odd number of items?

  • The line number where the error occurred is not always returned.

Environment

Both cljs and clojure.
OS independent.

Assignee

Nicola Mometto

Reporter

import

Labels

Approval

None

Patch

Code and Test

Priority

Major
Configure