Source:
<code>private boolean executeSingleFrame() { boolean finished = false; while (!ASTQueue.isEmpty()) { AST ast = ASTQueue.pop(); try { ast.eval(environment); } catch (WordsRuntimeException e) { System.err.println(); System.err.println(e.toString()); System.out.println("> "); } } for (WordsObject object : environment.getObjects()) { try { object.executeNextAction(environment); } catch (WordsProgramException e) { System.err.println("Error executing action on object " + object.getObjectName() + ": \n" + e.toString()); System.err.println("Action will not be performed"); System.out.println("> "); } } for (Iterator<WordsEventListener> iterator = environment.getEventListeners().iterator(); iterator.hasNext();) { try { WordsEventListener eventListener = iterator.next(); boolean delete = !eventListener.execute(environment); if (delete) { iterator.remove(); } } catch (WordsRuntimeException e) { <START> System.err.println(e.toString()); <END> System.out.println("> "); } } if (GUI != null) { GUI.clear(); for (WordsObject object : environment.getObjects()) { GUI.add(object.getCurrentCell(), object.getClassName(), object.getObjectName(), object.getCurrentMessage()); } GUI.render(); } else { System.out.println("frame #: " + numFrames); WordsLog log = new WordsLog(); for (WordsObject object : environment.getObjects()) { log.add(object.getCurrentCell(), object.getClassName(), object.getObjectName(), object.getCurrentMessage()); } log.log(); if (Option.FRAME_LIMIT_ENABLED && numFrames >= Option.MAX_FRAMES) finished = true; } ++numFrames; return finished; }</code><technical_language>If print a runtime exception, giving user information program wrong (only wrong). here, I this a WordsProgramException</technical_language>

Target:
private boolean executeSingleFrame() { boolean finished = false; while (!ASTQueue.isEmpty()) { AST ast = ASTQueue.pop(); try { ast.eval(environment); } catch (WordsRuntimeException e) { System.err.println(); System.err.println(e.toString()); System.out.println("> "); } } for (WordsObject object : environment.getObjects()) { try { object.executeNextAction(environment); } catch (WordsProgramException e) { System.err.println("Error executing action on object " + object.getObjectName() + ": \n" + e.toString()); System.err.println("Action will not be performed"); System.out.println("> "); } } for (Iterator<WordsEventListener> iterator = environment.getEventListeners().iterator(); iterator.hasNext();) { try { WordsEventListener eventListener = iterator.next(); boolean delete = !eventListener.execute(environment); if (delete) { iterator.remove(); } } catch (WordsProgramException e) { System.err.println(e.toString()); System.out.println("> "); } } if (GUI != null) { GUI.clear(); for (WordsObject object : environment.getObjects()) { GUI.add(object.getCurrentCell(), object.getClassName(), object.getObjectName(), object.getCurrentMessage()); } GUI.render(); } else { System.out.println("frame #: " + numFrames); WordsLog log = new WordsLog(); for (WordsObject object : environment.getObjects()) { log.add(object.getCurrentCell(), object.getClassName(), object.getObjectName(), object.getCurrentMessage()); } log.log(); if (Option.FRAME_LIMIT_ENABLED && numFrames >= Option.MAX_FRAMES) finished = true; } ++numFrames; return finished; }