On Jun 25, 10:02 am, James Reeves <weavejes...@googlemail.com> wrote:
> Here's one that regularly confuses me:
>
>   (prn [10)
>
>   => java.lang.Exception: Unmatched delimiter: )
>
> Ideally the exception should correctly report the type of unmatched
> bracket. In this case:
>
>   => java.lang.Exception: Unmatched delimiter: ]

I've just realised I've made a mistake. The error message is not
complaining that there is a parenthesis missing; it is complaining
that an ending parenthesis has no matching start parenthesis.

So this is an technically accurate error message, but perhaps not the
most intuitive, as a user is more likely to miss off an ending bracket
than a starting one. A better error message might be:

  => java.lang.Exception: Missing delimiter: ]

- James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to