These are user exceptions

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4712 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-11-21 02:08:11 +00:00
parent 374c0deba2
commit cff7c6ddce
1 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ public class JoinTable
while((line = br.readLine()) != null) {
final ArrayList<String> columnValues = parser.parseLine(line);
if ( columnValues.size() < columnNames.size() )
throw new IllegalStateException("The file: " + filename + " is malformed as there are not a sufficient number of columns for this line: " + line);
throw new UserException.BadInput("the file: " + filename + " is malformed as there are not a sufficient number of columns for this line: " + line);
final String joinColumnValue = columnValues.get(localColumnNameIdx);
put(joinColumnValue, columnValues, filename);
}
@ -218,9 +218,9 @@ public class JoinTable
*/
protected void put(String joinColumnValue, ArrayList<String> record, String filename) {
if ( joinColumnValueToRecords.containsKey(joinColumnValue) )
throw new IllegalStateException("The file " + filename + " contains non-unique entries for the requested column, which isn't allowed.");
throw new UserException.BadInput("the file " + filename + " contains non-unique entries for the requested column, which isn't allowed.");
joinColumnValueToRecords.put(joinColumnValue, record);
if ( joinColumnValueToRecords.size() > maxSize )
throw new IllegalStateException("The file " + filename + " contains more than the maximum number (" + maxSize + ") of allowed rows (see the --maxJoinTableSize argument).");
throw new UserException.BadInput("the file " + filename + " contains more than the maximum number (" + maxSize + ") of allowed rows (see the --maxJoinTableSize argument).");
}
}