only:better error message

This commit is contained in:
rusefillc 2023-12-10 13:45:12 -05:00
parent b675613b8f
commit f05ccd9a54
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public class WriteSimulatorConfiguration {
byte[] fileContent = Files.readAllBytes(new File(ROOT_FOLDER + tuneBinFileName).toPath());
System.out.println("Got " + fileContent.length + " from " + tuneBinFileName + " while expecting " + Fields.TOTAL_CONFIG_SIZE);
if (fileContent.length != Fields.TOTAL_CONFIG_SIZE)
throw new IllegalStateException("Unexpected image size " + fileContent.length);
throw new IllegalStateException("Unexpected image size " + fileContent.length + " while expecting " + Fields.TOTAL_CONFIG_SIZE);
ConfigurationImage configuration = new ConfigurationImage(fileContent);
System.out.println("Got " + Objects.requireNonNull(configuration, "configuration"));
IniFileModel ini = new IniFileModel().readIniFile(INI_FILE_FOR_SIMULATOR);