@Test(expected = IllegalArgumentException.class) public void testRaiseError() { scriptHandler.runScript(ScriptFragment.of("fail")); }
@Override public Object runScript(ScriptFragment scriptFragment) { ScriptRunner process = get(scriptFragment); if (process == null) { throw new IllegalArgumentException("can not find ScriptRunner for " + scriptFragment.toScriptString()); } return process.run(scriptFragment); }
DefaultScriptHandler implements ScriptHandler { @Override public Object runScript(ScriptFragment scriptFragment) { ScriptRunner process = get(scriptFragment); if (process == null) { throw new IllegalArgumentException("can not find ScriptRunner for " + scriptFragment.toScriptString()); } return process.run(scriptFragment); } }
DefaultScriptHandler implements ScriptHandler { @Override public Object runScript(ScriptFragment scriptFragment) { ScriptRunner process = get(scriptFragment); if (process == null) { throw new IllegalArgumentException("can not find ScriptRunner for " + scriptFragment.toScriptString()); } return process.run(scriptFragment); } DefaultScriptHandler(); }
DefaultScriptHandler implements ScriptHandler { @Override public Object runScript(ScriptFragment scriptFragment) { ScriptRunner process = get(scriptFragment); if (process == null) { throw new IllegalArgumentException("can not find ScriptRunner for " + scriptFragment.toScriptString()); } return process.run(scriptFragment); } DefaultScriptHandler(); @Override Object runScript(ScriptFragment scriptFragment); @Override void register(ScriptRunnerModule scriptRunnerModule); @Override void register(ScriptRunner scriptRunner); ScriptRunner get(ScriptFragment scriptFragment); }
DefaultScriptHandler implements ScriptHandler { @Override public Object runScript(ScriptFragment scriptFragment) { ScriptRunner process = get(scriptFragment); if (process == null) { throw new IllegalArgumentException("can not find ScriptRunner for " + scriptFragment.toScriptString()); } return process.run(scriptFragment); } DefaultScriptHandler(); @Override Object runScript(ScriptFragment scriptFragment); @Override void register(ScriptRunnerModule scriptRunnerModule); @Override void register(ScriptRunner scriptRunner); ScriptRunner get(ScriptFragment scriptFragment);  }