Skip to content

Commit

Permalink
More debug info.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlipp committed Nov 11, 2024
1 parent 7bdb048 commit f69a216
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
Expand Down Expand Up @@ -368,6 +370,11 @@ private void setFirmwarePaths() throws IOException {
break;
}
}
if (codePaths.iterator().hasNext() && config.firmwareRom == null) {
throw new IllegalArgumentException("No ROM found, candidates were: "
+ StreamSupport.stream(codePaths.spliterator(), false)
.map(JsonNode::asText).collect(Collectors.joining(", ")));
}

// Get file for firmware vars, if necessary
config.firmwareVars = config.dataDir.resolve(FW_VARS);
Expand Down

0 comments on commit f69a216

Please sign in to comment.