ICU-5287 add meaningful exception information to aid in debugging

X-SVN-Rev: 19948
This commit is contained in:
Mark Davis 2006-08-01 18:31:36 +00:00
parent 701fc92aa2
commit 57f9113fdc

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (c) 2001-2005, International Business Machines
* Copyright (c) 2001-2006, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
@ -698,9 +698,13 @@ class TransliteratorParser {
qlimit = qstart + 1;
}
UnicodeMatcher m =
new StringMatcher(buf.toString(), qstart, qlimit,
UnicodeMatcher m;
try {
m = new StringMatcher(buf.toString(), qstart, qlimit,
0, parser.curData);
} catch (RuntimeException e) {
throw new IllegalArgumentException("Failure in rule: " + rule.substring(pos, limit));
}
int min = 0;
int max = Quantifier.MAX;
switch (c) {