Skip to content

Commit

Permalink
make exceptions more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Mar 18, 2024
1 parent 04d80b9 commit c6ce030
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ public void runPythonIn( final String envName, final String... args ) throws IOE
}
// TODO find way to get env vars in micromamba builder.environment().putAll( getEnvironmentVariables( envName ) );
if ( builder.command( cmd ).start().waitFor() != 0 )
throw new RuntimeException();
throw new RuntimeException("Error executing the following command: " + builder.command());
}

/**
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public static void runPythonIn( final File envFile, final String... args ) throw
}
// TODO find way to get env vars in micromamba builder.environment().putAll( getEnvironmentVariables( envName ) );
if ( builder.command( cmd ).start().waitFor() != 0 )
throw new RuntimeException();
throw new RuntimeException("Error executing the following command: " + builder.command());
}

/**
Expand All @@ -1051,7 +1051,7 @@ public String getVersion() throws IOException, InterruptedException, MambaInstal
cmd.addAll( Arrays.asList( checkExecutablePath(mambaCommand), "--version" ) );
final Process process = getBuilder( false ).command( cmd ).start();
if ( process.waitFor() != 0 )
throw new RuntimeException();
throw new RuntimeException("Error getting Micromamba version");
return new BufferedReader( new InputStreamReader( process.getInputStream() ) ).readLine();
}

Expand Down

0 comments on commit c6ce030

Please sign in to comment.