Search in sources :

Example 1 with DslKspRule

use of io.vertigo.dynamo.plugins.environment.loaders.kpr.rules.DslKspRule in project vertigo by KleeGroup.

the class KspLoader method load.

/**
 * Chargement et analyse du fichier.
 *
 * @param dynamicModelrepository DynamicDefinitionRepository
 */
void load(final DslDefinitionRepository dynamicModelrepository) {
    Assertion.checkNotNull(dynamicModelrepository);
    try {
        final String s = parseFile();
        new DslKspRule(dynamicModelrepository).parse(s, 0);
    } catch (final PegNoMatchFoundException e) {
        final String message = StringUtil.format("Echec de lecture du fichier KSP {0}\n{1}", kspURL.getFile(), e.getFullMessage());
        throw WrappedException.wrap(e, message);
    } catch (final Exception e) {
        final String message = StringUtil.format("Echec de lecture du fichier KSP {0}\n{1}", kspURL.getFile(), e.getMessage());
        throw WrappedException.wrap(e, message);
    }
}
Also used : PegNoMatchFoundException(io.vertigo.commons.peg.PegNoMatchFoundException) DslKspRule(io.vertigo.dynamo.plugins.environment.loaders.kpr.rules.DslKspRule) WrappedException(io.vertigo.lang.WrappedException) IOException(java.io.IOException) PegNoMatchFoundException(io.vertigo.commons.peg.PegNoMatchFoundException)

Aggregations

PegNoMatchFoundException (io.vertigo.commons.peg.PegNoMatchFoundException)1 DslKspRule (io.vertigo.dynamo.plugins.environment.loaders.kpr.rules.DslKspRule)1 WrappedException (io.vertigo.lang.WrappedException)1 IOException (java.io.IOException)1