11package com .scriptbasic .executors ;
22
3- import com .scriptbasic .api .BasicRuntimeException ;
3+ import com .scriptbasic .api .ScriptBasicException ;
44import com .scriptbasic .context .Context ;
55import com .scriptbasic .errors .BasicInterpreterInternalError ;
66import com .scriptbasic .executors .commands .CommandSub ;
@@ -165,7 +165,7 @@ public void registerFunctions(final Class<?> klass) {
165165 }
166166 }
167167
168- private void preExecuteTask () throws ExecutionException {
168+ private void preExecuteTask () throws ScriptBasicException {
169169 if (executePreTask ) {
170170 if (program == null ) {
171171 throw new BasicRuntimeException ("Program code was not loaded" );
@@ -186,7 +186,7 @@ private void preExecuteTask() throws ExecutionException {
186186 * @see com.scriptbasic.interfaces.Interpreter#execute()
187187 */
188188 @ Override
189- public void execute () throws ExecutionException {
189+ public void execute () throws ScriptBasicException {
190190 preExecuteTask ();
191191 final Command command = program .getStartCommand ();
192192 execute (command );
@@ -200,7 +200,7 @@ public void execute() throws ExecutionException {
200200 * .interfaces.Command)
201201 */
202202 @ Override
203- public void execute (final Command startCommand ) throws ExecutionException {
203+ public void execute (final Command startCommand ) throws ScriptBasicException {
204204 preExecuteTask ();
205205 Command command = startCommand ;
206206 while (command != null ) {
@@ -226,7 +226,7 @@ public void execute(final Command startCommand) throws ExecutionException {
226226 */
227227 @ Override
228228 public void setVariable (final String name , final Object value )
229- throws ExecutionException {
229+ throws ScriptBasicException {
230230 final RightValue rightValue = RightValueUtility .createRightValue (value );
231231 getVariables ().setVariable (name , rightValue );
232232 }
@@ -237,7 +237,7 @@ public void setVariable(final String name, final Object value)
237237 * @see com.scriptbasic.interfaces.Interpreter#getVariable(java.lang.String)
238238 */
239239 @ Override
240- public Object getVariable (final String name ) throws ExecutionException {
240+ public Object getVariable (final String name ) throws ScriptBasicException {
241241 return CastUtility .toObject (getVariables ().getVariableValue (name ));
242242 }
243243
@@ -249,7 +249,7 @@ public Object getVariable(final String name) throws ExecutionException {
249249 */
250250 @ Override
251251 public Object call (final String functionName , final Object [] arguments )
252- throws ExecutionException {
252+ throws ScriptBasicException {
253253 preExecuteTask ();
254254 final CommandSub commandSub = getSubroutine (functionName );
255255 if (commandSub == null ) {
@@ -330,7 +330,7 @@ public Map<String, Class<?>> getUseMap() {
330330 */
331331 @ Override
332332 public Method getJavaMethod (final Class <?> klass , final String methodName )
333- throws ExecutionException {
333+ throws ScriptBasicException {
334334 return basicMethodRegistry .getJavaMethod (klass , methodName );
335335 }
336336
0 commit comments