Be more verbose when complaining about a non-trivial regex

In particular when constructing regular expressions before compiling them,
it is a good idea to state which exact expression is non-trivial when
complaining about it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2013-10-17 15:06:09 -05:00
parent b3d4f33522
commit 466a7fc0c0

View File

@ -40,7 +40,7 @@ public class Pattern {
if (! trivial(pattern)) { if (! trivial(pattern)) {
throw new UnsupportedOperationException throw new UnsupportedOperationException
("only trivial regular expressions are supported so far"); ("only trivial regular expressions are supported so far (" + pattern + ")");
} }
} }