Search in sources :

Example 1 with InvalidFileFormatException

use of org.ini4j.InvalidFileFormatException in project NoraUi by NoraUi.

the class Context method initApplicationDom.

protected static void initApplicationDom(ClassLoader loader, String version, String applicationKey) {
    try {
        final InputStream data = loader.getResourceAsStream("selectors/" + version + "/" + applicationKey + ".ini");
        if (data != null) {
            final Ini ini = new Ini(data);
            iniFiles.put(applicationKey, ini);
        }
    } catch (final InvalidFileFormatException e) {
        logger.error("error Context.initApplicationDom()", e);
    } catch (final IOException e) {
        logger.error(Messages.getMessage(CONTEXT_APP_INI_FILE_NOT_FOUND), applicationKey, e);
    }
}
Also used : InvalidFileFormatException(org.ini4j.InvalidFileFormatException) Ini(org.ini4j.Ini) InputStream(java.io.InputStream) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Ini (org.ini4j.Ini)1 InvalidFileFormatException (org.ini4j.InvalidFileFormatException)1