Search in sources :

Example 1 with ExecutionException

use of org.elixir_lang.jps.builder.ExecutionException in project intellij-elixir by KronicDeth.

the class Builder method run.

private static void run(@NotNull GeneralCommandLine commandLine, @NotNull CompileContext context, @NotNull String builderName, @NotNull CompilerOptions compilerOptions) throws ProjectBuildException {
    Process process;
    try {
        process = commandLine.createProcess();
    } catch (ExecutionException executionException) {
        throw new ProjectBuildException("Failed to run " + builderName, executionException);
    }
    BaseOSProcessHandler handler = new BaseOSProcessHandler(process, commandLine.getCommandLineString(), Charset.defaultCharset());
    com.intellij.execution.process.ProcessAdapter adapter = new ProcessAdapter(context, builderName, commandLine.getWorkDirectory().getPath(), compilerOptions);
    handler.addProcessListener(adapter);
    handler.startNotify();
    handler.waitFor();
}
Also used : ProjectBuildException(org.jetbrains.jps.incremental.ProjectBuildException) ProcessAdapter(org.elixir_lang.jps.builder.ProcessAdapter) ExecutionException(org.elixir_lang.jps.builder.ExecutionException) BaseOSProcessHandler(com.intellij.execution.process.BaseOSProcessHandler)

Aggregations

BaseOSProcessHandler (com.intellij.execution.process.BaseOSProcessHandler)1 ExecutionException (org.elixir_lang.jps.builder.ExecutionException)1 ProcessAdapter (org.elixir_lang.jps.builder.ProcessAdapter)1 ProjectBuildException (org.jetbrains.jps.incremental.ProjectBuildException)1