MCPcopy Index your code
hub / github.com/beanshell/beanshell / eval

Method eval

bsf/src/bsh/util/BeanShellBSFEngine.java:177–203  ·  view source on GitHub ↗
(
		String source, int lineNo, int columnNo, Object expr)

Source from the content-addressed store, hash-verified

175 }
176
177 public Object eval (
178 String source, int lineNo, int columnNo, Object expr)
179 throws BSFException
180 {
181 if ( ! (expr instanceof String) )
182 throw new BSFException("BeanShell expression must be a string");
183
184 try {
185 return interpreter.eval( ((String)expr) );
186 } catch ( InterpreterError e )
187 {
188 throw new BSFException(
189 "BeanShell interpreter internal error: "+e
190 + sourceInfo(source,lineNo,columnNo) );
191 } catch ( TargetError e2 )
192 {
193 throw new BSFException(
194 "The application script threw an exception: "
195 + e2.getTarget()
196 + sourceInfo(source,lineNo,columnNo) );
197 } catch ( EvalError e3 )
198 {
199 throw new BSFException(
200 "BeanShell script error: "+e3
201 + sourceInfo(source,lineNo,columnNo) );
202 }
203 }
204
205
206 public void exec (String source, int lineNo, int columnNo, Object script)

Callers 1

execMethod · 0.95

Calls 3

sourceInfoMethod · 0.95
getTargetMethod · 0.80
evalMethod · 0.65

Tested by

no test coverage detected