JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Syntax error in a regexp gives very confusing error message #195

Open behrica opened 9 years ago

behrica commented 9 years ago

If I create a regexp with an syntax error inside of the regexp, I get a confusing error in Gorilla (because the real error message is not visible:

(def re #"*test")
=>RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:221)

If I run it in a normal repl, I get the full error message, which in this case shows teh correct exception:

(def re #"*test")
=>
PatternSyntaxException Dangling meta character '*' near index 0
*test
^  java.util.regex.Pattern.error (Pattern.java:1924)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:221)
JonyEpsilon commented 9 years ago

Thanks for the report @behrica :-) Have been busy these last weeks, but hopefully should have some time to put towards Gorilla shortly, and will look at this then.

Jony