topBarTemplate.process(topBarModel, stringWriter);
return stringWriter.toString();
} catch (final JSONException e) {
LOGGER.log(Level.ERROR, "Gens top bar HTML failed", e);
throw new ServiceException(e);
} catch (final IOException e) {
LOGGER.log(Level.ERROR, "Gens top bar HTML failed", e);
throw new ServiceException(e);
} catch (final TemplateException e) {
LOGGER.log(Level.ERROR, "Gens top bar HTML failed", e);
throw new ServiceException(e);
} finally {
Stopwatchs.end();
}
}