Search in sources :

Example 1 with Result

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

the class ScriptEngineImpl method eval.

@Override
public Object eval(String script, ScriptContext context) throws ScriptException {
    if (context == null)
        context = getContext();
    PageContext oldPC = ThreadLocalPageContext.get();
    PageContext pc = getPageContext(context);
    try {
        Result res = factory.tag ? Renderer.tag(pc, script, factory.dialect, false, true) : Renderer.script(pc, script, factory.dialect, false, true);
        return res.getValue();
    } catch (PageException pe) {
        throw toScriptException(pe);
    } finally {
        releasePageContext(pc, oldPC);
    }
}
Also used : PageException(lucee.runtime.exp.PageException) PageContext(lucee.runtime.PageContext) ThreadLocalPageContext(lucee.runtime.engine.ThreadLocalPageContext) Result(lucee.runtime.compiler.Renderer.Result)

Aggregations

PageContext (lucee.runtime.PageContext)1 Result (lucee.runtime.compiler.Renderer.Result)1 ThreadLocalPageContext (lucee.runtime.engine.ThreadLocalPageContext)1 PageException (lucee.runtime.exp.PageException)1