}
// now go through each theme and load it into a Theme object
for (int i = 0; i < themenames.length; i++) {
try {
Theme theme = new SharedThemeFromDir(this.themeDir + File.separator + themenames[i]);
if (theme != null) {
themeMap.put(theme.getId(), theme);
}
} catch (Throwable unexpected) {
// shouldn't happen, so let's learn why it did
log.error("Problem reading theme " + themenames[i], unexpected);
}