Skip to content

Commit

Permalink
More meaningful error when mapping modules to heatmap with repeated r…
Browse files Browse the repository at this point in the history
…ow names.
  • Loading branch information
mpschr committed Apr 18, 2012
1 parent 6b3d9c5 commit ae61205
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -54,9 +54,13 @@ public ModuleMap read(File file, IProgressMonitor monitor) throws PersistenceExc

if (isItemNamesFilterEnabled()) {
String[] itemNames = getItemNames();
for (int i = 0; i < itemNames.length; i++)
itemNameToRowMapping.put(itemNames[i], i);
}
for (int i = 0; i < itemNames.length; i++) {
if (itemNameToRowMapping.containsKey(itemNames[i]))
throw new PersistenceException("Modules not mappable to heatmap due to duplicated row: " + itemNames[i]);
else
itemNameToRowMapping.put(itemNames[i], i);
}
}

// map between modules and item indices

Expand Down

0 comments on commit ae61205

Please sign in to comment.