Better error message.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1088 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ConfigUtil.java,v 1.10 2003/01/12 00:49:22 mdb Exp $
|
// $Id: ConfigUtil.java,v 1.11 2003/04/02 04:01:50 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -398,10 +398,17 @@ public class ConfigUtil
|
|||||||
throw new IOException(errmsg);
|
throw new IOException(errmsg);
|
||||||
|
|
||||||
} else if (crowns.size() > 1) {
|
} else if (crowns.size() > 1) {
|
||||||
String errmsg = "Multiple top-level properties were found, " +
|
StringBuffer errmsg = new StringBuffer();
|
||||||
"one definitive top-level file must provide an order " +
|
errmsg.append("Multiple top-level properties were found, ");
|
||||||
"for all others " + StringUtil.toString(crowns);
|
errmsg.append("one definitive top-level file must provide ");
|
||||||
throw new IOException(errmsg);
|
errmsg.append("an order for all others:\n");
|
||||||
|
for (int ii = 0; ii < crowns.size(); ii++) {
|
||||||
|
if (ii > 0) {
|
||||||
|
errmsg.append("\n");
|
||||||
|
}
|
||||||
|
errmsg.append(crowns.get(ii));
|
||||||
|
}
|
||||||
|
throw new IOException(errmsg.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
crown = (PropRecord)crowns.get(0);
|
crown = (PropRecord)crowns.get(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user