@Test
public void testCompileWithRuntimeException() throws Exception {
ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
Assert.assertNotNull(model);
CeylonCompileTool tool = pluginFactory.bindArguments(model,
options("--src=test/src", "com.redhat.ceylon.tools.test.runtimeex"));
try{
tool.run();
Assert.fail("Tool should have thrown an exception");
}catch(CompilerErrorException x){
Assert.assertEquals("There was 1 error", x.getMessage());
}catch(Throwable t){
t.printStackTrace();