1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 317075: Wrong text to the exception

This commit is contained in:
Marc Khouzam 2010-06-16 19:42:54 +00:00
parent 4c8a4d2d74
commit af62fdaef7

View file

@ -158,19 +158,18 @@ public class MapProblemPreference extends AbstractProblemPreference implements
int token;
try {
token = tokenizer.nextToken();
String chara = String.valueOf((char) token);
if (token != '{') {
throw new IllegalArgumentException(chara);
throw new IllegalArgumentException(String.valueOf((char) token));
}
while (true) {
token = tokenizer.nextToken();
String key = tokenizer.sval;
token = tokenizer.nextToken();
if (token != '=')
throw new IllegalArgumentException(chara);
throw new IllegalArgumentException(String.valueOf((char) token));
token = tokenizer.nextToken();
if (token != '>')
throw new IllegalArgumentException(chara);
throw new IllegalArgumentException(String.valueOf((char) token));
IProblemPreference desc = getChildDescriptor(key);
if (desc != null && desc instanceof AbstractProblemPreference) {
((AbstractProblemPreference) desc).importValue(tokenizer);
@ -180,7 +179,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements
if (token == '}')
break;
if (token != ',')
throw new IllegalArgumentException(chara);
throw new IllegalArgumentException(String.valueOf((char) token));
}
} catch (IOException e) {
throw new IllegalArgumentException(e);