Package org.webharvest.exception

Examples of org.webharvest.exception.ScriptException


        super(context);
        this.beanShellInterpreter.getNameSpace().importCommands("org.webharvest.runtime.scripting");
        try {
            this.beanShellInterpreter.set(CONTEXT_VARIABLE_NAME, this.context);
        } catch (EvalError e) {
            throw new ScriptException("Cannot set Web-Harvest context in scripter: " + e.getMessage(), e);
        }
    }
View Full Code Here


     */
    public void setVariable(String name, Object value) {
        try {
            this.beanShellInterpreter.set(name, value);
        } catch (EvalError e) {
            throw new ScriptException("Cannot set variable in scripter: " + e.getMessage(), e);
        }
    }
View Full Code Here

        pushAllVariablesFromContextToScriptEngine();

        try {
            return this.beanShellInterpreter.eval(expression);
        } catch (EvalError e) {
            throw new ScriptException("Error during script execution: " + e.getMessage(), e);
        }
    }
View Full Code Here

            ScraperContext context = (ScraperContext) interpreter.get(ScriptEngine.CONTEXT_VARIABLE_NAME);
            if (context != null) {
                context.setVar(name, value);
            }
        } catch (EvalError e) {
            throw new ScriptException("Cannot get web-Harvest context from interpreter: " + e.getMessage(), e);
        }
   }
View Full Code Here

TOP

Related Classes of org.webharvest.exception.ScriptException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.