Search in sources :

Example 1 with Result

use of lucee.runtime.compiler.CFMLCompilerImpl.Result in project Lucee by lucee.

the class PageSourceImpl method _compile.

private Page _compile(ConfigWeb config, Resource classRootDir, Page existing, boolean returnValue, boolean ignoreScopes) throws IOException, SecurityException, IllegalArgumentException, PageException {
    ConfigWebImpl cwi = (ConfigWebImpl) config;
    int dialect = getDialect();
    long now;
    if ((getPhyscalFile().lastModified() + 10000) > (now = System.currentTimeMillis()))
        // SystemUtil.get
        cwi.getCompiler().watch(this, now);
    Result result;
    result = cwi.getCompiler().compile(cwi, this, cwi.getTLDs(dialect), cwi.getFLDs(dialect), classRootDir, returnValue, ignoreScopes);
    try {
        Class<?> clazz = mapping.getPhysicalClass(getClassName(), result.barr);
        return newInstance(clazz);
    } catch (Throwable t) {
        ExceptionUtil.rethrowIfNecessary(t);
        PageException pe = Caster.toPageException(t);
        pe.setExtendedInfo("failed to load template " + getDisplayPath());
        throw pe;
    }
}
Also used : ConfigWebImpl(lucee.runtime.config.ConfigWebImpl) PageException(lucee.runtime.exp.PageException) Result(lucee.runtime.compiler.CFMLCompilerImpl.Result)

Aggregations

Result (lucee.runtime.compiler.CFMLCompilerImpl.Result)1 ConfigWebImpl (lucee.runtime.config.ConfigWebImpl)1 PageException (lucee.runtime.exp.PageException)1