gorilla-repl icon indicating copy to clipboard operation
gorilla-repl copied to clipboard

Syntax error in a regexp gives very confusing error message

Open behrica opened this issue 10 years ago • 1 comments

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)

behrica avatar Feb 12 '15 08:02 behrica

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

JonyEpsilon avatar Mar 04 '15 18:03 JonyEpsilon